From b978393303805807ca06543b548f7542d5bd3463 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Tue, 19 Jul 2022 14:44:11 -0400 Subject: [PATCH 1/3] [Vision] Add support for Xcode 14 beta 1,2 & 3 (#15538) Co-authored-by: Alex Soto --- src/vision.cs | 31 +++++++++++++++++++ .../api-annotations-dotnet/iOS-Vision.todo | 11 ------- .../api-annotations-dotnet/macOS-Vision.todo | 11 ------- .../api-annotations-dotnet/tvOS-Vision.todo | 11 ------- tests/xtro-sharpie/iOS-Vision.todo | 11 ------- tests/xtro-sharpie/macOS-Vision.todo | 11 ------- tests/xtro-sharpie/tvOS-Vision.todo | 11 ------- 7 files changed, 31 insertions(+), 66 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-Vision.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/macOS-Vision.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/tvOS-Vision.todo delete mode 100644 tests/xtro-sharpie/iOS-Vision.todo delete mode 100644 tests/xtro-sharpie/macOS-Vision.todo delete mode 100644 tests/xtro-sharpie/tvOS-Vision.todo diff --git a/src/vision.cs b/src/vision.cs index fa441694edf6..6b70df5fe6eb 100644 --- a/src/vision.cs +++ b/src/vision.cs @@ -39,6 +39,7 @@ namespace Vision { [TV (11,0), Mac (10,13), iOS (11,0)] [Native] enum VNErrorCode : long { + TuriCore = -1, Ok = 0, RequestCancelled, InvalidFormat, @@ -59,6 +60,7 @@ enum VNErrorCode : long { DataUnavailable, TimeStampNotFound, UnsupportedRequest, + Timeout, } [TV (11,0), Mac (10,13), iOS (11,0)] @@ -74,6 +76,10 @@ enum VNImageCropAndScaleOption : ulong { CenterCrop = 0, ScaleFit = 1, ScaleFill = 2, + [TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)] + ScaleFitRotate90Ccw = 256 + ScaleFit, + [TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)] + ScaleFillRotate90Ccw = 256 + ScaleFill, } [TV (11,0), Mac (10,13), iOS (11,0)] @@ -663,6 +669,15 @@ public enum VNGeneratePersonSegmentationRequestQualityLevel : ulong Fast, } + [TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)] + [Native] + public enum VNPointsClassification : long + { + Disconnected = 0, + OpenPath, + ClosedPath, + } + [TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] [BaseType (typeof(VNDetectedObjectObservation))] [DisableDefaultCtor] @@ -1081,6 +1096,10 @@ interface VNFaceLandmarkRegion2D { [BindAs (typeof (nfloat []))] [NullAllowed, Export ("precisionEstimatesPerPoint")] NSNumber [] PrecisionEstimatesPerPoint { get; } + + [TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)] + [Export ("pointsClassification")] + VNPointsClassification PointsClassification { get; } } [TV (11,0), Mac (10,13), iOS (11,0)] @@ -1837,6 +1856,10 @@ interface VNHorizonObservation { [Export ("angle")] nfloat Angle { get; } + + [TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)] + [Export ("transformForImageWidth:height:")] + CGAffineTransform CreateTransform (nuint width, nuint height); } [TV (11,0), Mac (10,13), iOS (11,0)] @@ -2829,6 +2852,10 @@ interface VNRecognizeTextRequest : VNRequestProgressProviding { [Static] [Export ("currentRevision")] VNRecognizeTextRequestRevision CurrentRevision { get; } + + [TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)] + [Export ("automaticallyDetectsLanguage")] + bool AutomaticallyDetectsLanguage { get; set; } } [TV (13,0), Mac (10,15), iOS (13,0)] @@ -3477,6 +3504,10 @@ interface VNGenerateOpticalFlowRequest { [Static] [Export ("currentRevision")] VNGenerateOpticalFlowRequestRevision CurrentRevision { get; } + + [TV (16,0), Mac (13,0), iOS (16,0), MacCatalyst (16,0)] + [Export ("keepNetworkOutput")] + bool KeepNetworkOutput { get; set; } } [TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Vision.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-Vision.todo deleted file mode 100644 index 3089ee5d8689..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Vision.todo +++ /dev/null @@ -1,11 +0,0 @@ -!missing-enum! VNPointsClassification not bound -!missing-enum-value! VNErrorCode native value VNErrorTimeout = 20 not bound -!missing-enum-value! VNErrorCode native value VNErrorTuriCoreErrorCode = -1 not bound -!missing-enum-value! VNImageCropAndScaleOption native value VNImageCropAndScaleOptionScaleFillRotate90CCW = 258 not bound -!missing-enum-value! VNImageCropAndScaleOption native value VNImageCropAndScaleOptionScaleFitRotate90CCW = 257 not bound -!missing-selector! VNFaceLandmarkRegion2D::pointsClassification not bound -!missing-selector! VNGenerateOpticalFlowRequest::keepNetworkOutput not bound -!missing-selector! VNGenerateOpticalFlowRequest::setKeepNetworkOutput: not bound -!missing-selector! VNHorizonObservation::transformForImageWidth:height: not bound -!missing-selector! VNRecognizeTextRequest::automaticallyDetectsLanguage not bound -!missing-selector! VNRecognizeTextRequest::setAutomaticallyDetectsLanguage: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Vision.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-Vision.todo deleted file mode 100644 index 3089ee5d8689..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Vision.todo +++ /dev/null @@ -1,11 +0,0 @@ -!missing-enum! VNPointsClassification not bound -!missing-enum-value! VNErrorCode native value VNErrorTimeout = 20 not bound -!missing-enum-value! VNErrorCode native value VNErrorTuriCoreErrorCode = -1 not bound -!missing-enum-value! VNImageCropAndScaleOption native value VNImageCropAndScaleOptionScaleFillRotate90CCW = 258 not bound -!missing-enum-value! VNImageCropAndScaleOption native value VNImageCropAndScaleOptionScaleFitRotate90CCW = 257 not bound -!missing-selector! VNFaceLandmarkRegion2D::pointsClassification not bound -!missing-selector! VNGenerateOpticalFlowRequest::keepNetworkOutput not bound -!missing-selector! VNGenerateOpticalFlowRequest::setKeepNetworkOutput: not bound -!missing-selector! VNHorizonObservation::transformForImageWidth:height: not bound -!missing-selector! VNRecognizeTextRequest::automaticallyDetectsLanguage not bound -!missing-selector! VNRecognizeTextRequest::setAutomaticallyDetectsLanguage: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Vision.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Vision.todo deleted file mode 100644 index 3089ee5d8689..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Vision.todo +++ /dev/null @@ -1,11 +0,0 @@ -!missing-enum! VNPointsClassification not bound -!missing-enum-value! VNErrorCode native value VNErrorTimeout = 20 not bound -!missing-enum-value! VNErrorCode native value VNErrorTuriCoreErrorCode = -1 not bound -!missing-enum-value! VNImageCropAndScaleOption native value VNImageCropAndScaleOptionScaleFillRotate90CCW = 258 not bound -!missing-enum-value! VNImageCropAndScaleOption native value VNImageCropAndScaleOptionScaleFitRotate90CCW = 257 not bound -!missing-selector! VNFaceLandmarkRegion2D::pointsClassification not bound -!missing-selector! VNGenerateOpticalFlowRequest::keepNetworkOutput not bound -!missing-selector! VNGenerateOpticalFlowRequest::setKeepNetworkOutput: not bound -!missing-selector! VNHorizonObservation::transformForImageWidth:height: not bound -!missing-selector! VNRecognizeTextRequest::automaticallyDetectsLanguage not bound -!missing-selector! VNRecognizeTextRequest::setAutomaticallyDetectsLanguage: not bound diff --git a/tests/xtro-sharpie/iOS-Vision.todo b/tests/xtro-sharpie/iOS-Vision.todo deleted file mode 100644 index 3089ee5d8689..000000000000 --- a/tests/xtro-sharpie/iOS-Vision.todo +++ /dev/null @@ -1,11 +0,0 @@ -!missing-enum! VNPointsClassification not bound -!missing-enum-value! VNErrorCode native value VNErrorTimeout = 20 not bound -!missing-enum-value! VNErrorCode native value VNErrorTuriCoreErrorCode = -1 not bound -!missing-enum-value! VNImageCropAndScaleOption native value VNImageCropAndScaleOptionScaleFillRotate90CCW = 258 not bound -!missing-enum-value! VNImageCropAndScaleOption native value VNImageCropAndScaleOptionScaleFitRotate90CCW = 257 not bound -!missing-selector! VNFaceLandmarkRegion2D::pointsClassification not bound -!missing-selector! VNGenerateOpticalFlowRequest::keepNetworkOutput not bound -!missing-selector! VNGenerateOpticalFlowRequest::setKeepNetworkOutput: not bound -!missing-selector! VNHorizonObservation::transformForImageWidth:height: not bound -!missing-selector! VNRecognizeTextRequest::automaticallyDetectsLanguage not bound -!missing-selector! VNRecognizeTextRequest::setAutomaticallyDetectsLanguage: not bound diff --git a/tests/xtro-sharpie/macOS-Vision.todo b/tests/xtro-sharpie/macOS-Vision.todo deleted file mode 100644 index 3089ee5d8689..000000000000 --- a/tests/xtro-sharpie/macOS-Vision.todo +++ /dev/null @@ -1,11 +0,0 @@ -!missing-enum! VNPointsClassification not bound -!missing-enum-value! VNErrorCode native value VNErrorTimeout = 20 not bound -!missing-enum-value! VNErrorCode native value VNErrorTuriCoreErrorCode = -1 not bound -!missing-enum-value! VNImageCropAndScaleOption native value VNImageCropAndScaleOptionScaleFillRotate90CCW = 258 not bound -!missing-enum-value! VNImageCropAndScaleOption native value VNImageCropAndScaleOptionScaleFitRotate90CCW = 257 not bound -!missing-selector! VNFaceLandmarkRegion2D::pointsClassification not bound -!missing-selector! VNGenerateOpticalFlowRequest::keepNetworkOutput not bound -!missing-selector! VNGenerateOpticalFlowRequest::setKeepNetworkOutput: not bound -!missing-selector! VNHorizonObservation::transformForImageWidth:height: not bound -!missing-selector! VNRecognizeTextRequest::automaticallyDetectsLanguage not bound -!missing-selector! VNRecognizeTextRequest::setAutomaticallyDetectsLanguage: not bound diff --git a/tests/xtro-sharpie/tvOS-Vision.todo b/tests/xtro-sharpie/tvOS-Vision.todo deleted file mode 100644 index 3089ee5d8689..000000000000 --- a/tests/xtro-sharpie/tvOS-Vision.todo +++ /dev/null @@ -1,11 +0,0 @@ -!missing-enum! VNPointsClassification not bound -!missing-enum-value! VNErrorCode native value VNErrorTimeout = 20 not bound -!missing-enum-value! VNErrorCode native value VNErrorTuriCoreErrorCode = -1 not bound -!missing-enum-value! VNImageCropAndScaleOption native value VNImageCropAndScaleOptionScaleFillRotate90CCW = 258 not bound -!missing-enum-value! VNImageCropAndScaleOption native value VNImageCropAndScaleOptionScaleFitRotate90CCW = 257 not bound -!missing-selector! VNFaceLandmarkRegion2D::pointsClassification not bound -!missing-selector! VNGenerateOpticalFlowRequest::keepNetworkOutput not bound -!missing-selector! VNGenerateOpticalFlowRequest::setKeepNetworkOutput: not bound -!missing-selector! VNHorizonObservation::transformForImageWidth:height: not bound -!missing-selector! VNRecognizeTextRequest::automaticallyDetectsLanguage not bound -!missing-selector! VNRecognizeTextRequest::setAutomaticallyDetectsLanguage: not bound From 263410f3da2eae9df95cc088d8375ca8a126c006 Mon Sep 17 00:00:00 2001 From: VS MobileTools Engineering Service 2 Date: Tue, 19 Jul 2022 16:20:26 -0700 Subject: [PATCH 2/3] [devops] Try parallelize less during the API diff build. (#15536) For some reason the C# compilers crash a lot during the build in src/ when building for the API diff (but not the normal build!). So test the theory that we're overloading the bot in question (OOM maybe?) by slowing down a bit. I have to say that if this works and the theory is proven, it's kind of sad that after over a decade doing -j8 the bot situation has gotten worse... Co-authored-by: Rolf Bjarne Kvinge --- .../templates/build/api-diff-build-and-detect.yml | 1 + tools/devops/automation/templates/build/build.yml | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/devops/automation/templates/build/api-diff-build-and-detect.yml b/tools/devops/automation/templates/build/api-diff-build-and-detect.yml index becee8bbb982..1b3af802dd60 100644 --- a/tools/devops/automation/templates/build/api-diff-build-and-detect.yml +++ b/tools/devops/automation/templates/build/api-diff-build-and-detect.yml @@ -34,6 +34,7 @@ steps: gitHubToken: ${{ parameters.gitHubToken }} xqaCertPass: ${{ parameters.xqaCertPass }} enableDotnet: ${{ parameters.enableDotnet }} + makeParallelism: '4' # detect changes - bash: $(Build.SourcesDirectory)/xamarin-macios/tools/devops/automation/scripts/bash/compare.sh diff --git a/tools/devops/automation/templates/build/build.yml b/tools/devops/automation/templates/build/build.yml index a0d6681429de..4e35371b9e42 100644 --- a/tools/devops/automation/templates/build/build.yml +++ b/tools/devops/automation/templates/build/build.yml @@ -27,6 +27,10 @@ parameters: type: stepList default: [] +- name: makeParallelism + type: string + default: '8' + steps: - template: ../common/checkout.yml @@ -252,8 +256,12 @@ steps: MAKE_FLAGS="V=1 -w" fi - time make -C $(Build.SourcesDirectory)/xamarin-macios/ all -j8 $MAKE_FLAGS - time make -C $(Build.SourcesDirectory)/xamarin-macios/ install -j8 $MAKE_FLAGS + if test -z "$makeParallelism"; then + makeParallelism=8 + fi + + time make -C $(Build.SourcesDirectory)/xamarin-macios/ all -j$makeParallelism $MAKE_FLAGS + time make -C $(Build.SourcesDirectory)/xamarin-macios/ install -j$makeParallelism $MAKE_FLAGS name: build displayName: 'Build' timeoutInMinutes: 300 From 5814da5497a7519908b207813468691d9218fd6b Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Tue, 19 Jul 2022 20:14:48 -0400 Subject: [PATCH 3/3] [Xtro] Clean file that was missed due to xtro bug. (#15554) Issue for fixed in https://github.com/xamarin/xamarin-macios/pull/15552 --- tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreText.ignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreText.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreText.ignore index ac1463bccb5e..8a6839624f0a 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreText.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreText.ignore @@ -1,3 +1 @@ # bound in previous versions but removed in xcode 14 -!extra-enum-value! Managed value 1 for CTFontTableOptions.ExcludeSynthetic is available for the current platform while the value in the native header is not -!extra-enum-value! Managed value 10 for CTParagraphStyleSpecifier.LineSpacing is available for the current platform while the value in the native header is not