Граф коммитов

15025 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 09da0bdfeb
[autoformat] Add the MetalKit, MetalPerformanceShaders, MobileCoreServices, ModelIO, MultipeerConnectivity, NaturalLanguage and NearbyInteraction frameworks. (#16829) 2022-11-21 20:52:01 +01:00
dotnet-maestro[bot] d301205b19
[main] Update dependencies from dotnet/runtime (#16827)
This pull request updates the following dependencies

## Coherency Updates

The following updates ensure that dependencies with a
*CoherentParentDependency*
attribute were produced in a build used as input to the parent
dependency's build.
See [Dependency Description
Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
- **Microsoft.NET.Workload.Emscripten.net7.Manifest-7.0.100**: from
7.0.1 to 7.0.1 (parent: Microsoft.NETCore.App.Ref)

## From https://github.com/dotnet/runtime
- **Subscription**: 38d2313f-22d5-4062-c8e1-08dabd6d8c77
- **Build**: 20221118.3
- **Date Produced**: November 18, 2022 9:27:38 PM UTC
- **Commit**: 9bc19b7ab7f6bc01e4dbe1a7220a89f5b67d6228
- **Branch**: refs/heads/release/7.0

- **Updates**:
  - **Microsoft.NETCore.App.Ref**: [from 7.0.1 to 7.0.1][5]
- **Microsoft.NET.Workload.Emscripten.net7.Manifest-7.0.100**: [from
7.0.1 to 7.0.1][6]

[5]: 12b1873...9bc19b7
[6]: 3a6c724...73eb134

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2022-11-21 12:37:37 +01:00
Rolf Bjarne Kvinge 8ad6a27a12
[autoformat] Add the iAd, iTunesLibrary, WebKit, WatchKit and WatchConnectivity frameworks. (#16831) 2022-11-21 12:06:40 +01:00
Rolf Bjarne Kvinge 9ce7b75a42
[autoformat] Add the OpenGL framework. (#16833) 2022-11-21 12:05:46 +01:00
Rolf Bjarne Kvinge acca13229e
[apidiff] Generate a complete and valid html file for api-diff.html. (#16805)
This fixes an issue where emojis weren't rendered as such in some browsers,
because the browser would use a different character set than utf8.
2022-11-21 10:14:53 +01:00
Rolf Bjarne Kvinge 0076cd9920
[autoformat] Add .NET tests. (#16811) 2022-11-21 09:45:49 +01:00
Rolf Bjarne Kvinge 00e59771fe
[mtouch] Only package introspection dependencies if both iOS and legacy are enabled. (#16812)
Fixes this on the bots when iOS is not enabled even though legacy is:

    + make -C /Users/builder/azdo/_work/1/s/xamarin-macios/tools/mtouch package-introspection-dependencies.zip
    make: *** No rule to make target `../../runtime/.libs/iphonesimulator/libxamarin-debug.a', needed by `simlauncher32-sgen'.  Stop.
2022-11-21 09:45:21 +01:00
Rolf Bjarne Kvinge 1454fe6d13
[devops] Update according to renamed label. (#16813)
Also add 'run-packaged-macos-tests' to the labels we care about.

This fixes an issue where the label combination
'skip-all-tests,run-packaged-macos-tests' would not run any tests.
2022-11-21 09:43:25 +01:00
Rolf Bjarne Kvinge ce1a2a7036
[tests] Improve AsyncTests.Bug12221 to not fail on 403 errors on the bots. (#16815)
Fixes:

    [FAIL] Bug12221 : System.AggregateException : One or more errors occurred. (Response status code does not indicate success: 403 (Forbidden).)
    ----> System.Net.Http.HttpRequestException : Response status code does not indicate success: 403 (Forbidden).
          at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean )
          at System.Threading.Tasks.Task.Wait(Int32 , CancellationToken )
          at System.Threading.Tasks.Task.Wait()
          at LinkSdk.AsyncTests.Bug12221() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/linker/ios/link sdk/AsyncTest.cs:line 25
          at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
       --HttpRequestException
          at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
          at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage , CancellationToken )
          at LinkSdk.AsyncTests.<>c.<<LoadCategories>b__0_0>d.MoveNext() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/linker/ios/link sdk/AsyncTest.cs:line 16

One important detail is the change from calling 'Wait ()' to calling
'GetAwaiter ().GetResult ()': this is to avoid the AggregateException in the
stack trace above.

Fixes https://github.com/xamarin/maccore/issues/2570.
2022-11-21 09:37:31 +01:00
Rolf Bjarne Kvinge b3870ccb6d
[tests] Adjust MonoTouchFixtures.VideoToolbox.VTCompressionSessionTests.TestCallback to ignore timeouts in CI. (#16816)
Fixes:

    MonoTouchFixtures.VideoToolbox.VTCompressionSessionTests.TestCallback
    	[FAIL] TestCallback(True) :   timed out
      Expected: True
      But was:  False
    		   at MonoTouchFixtures.VideoToolbox.VTCompressionSessionTests.TestCallback(Boolean stronglyTyped) in /Users/builder/azdo/_work/3/s/xamarin-macios/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs:line 171
    	[FAIL] TestCallback(False) :   timed out
      Expected: True
      But was:  False
    		   at MonoTouchFixtures.VideoToolbox.VTCompressionSessionTests.TestCallback(Boolean stronglyTyped) in /Users/builder/azdo/_work/3/s/xamarin-macios/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs:line 171
    		   at InvokeStub_VTCompressionSessionTests.TestCallback(Object, Object, IntPtr*)
2022-11-21 09:37:08 +01:00
Rolf Bjarne Kvinge 5ba78a77cd
[tests] Update the size-comparison test to work on .NET 7+. (#16818) 2022-11-21 09:36:46 +01:00
Rolf Bjarne Kvinge 5583f5c6b2
[dotnet] Ensure all templates are targetting .NET 7. (#16819) 2022-11-21 09:35:40 +01:00
Rolf Bjarne Kvinge 328f56fd4f
[tests] Ensure all .NET tests use the current .NET version. (#16820) 2022-11-21 09:35:04 +01:00
Rolf Bjarne Kvinge 5eab988136
[src] Simplify some code by using the discard operator in a few places. (#16821) 2022-11-21 09:34:32 +01:00
Rolf Bjarne Kvinge 3137ef5497
[src] Remove availability attributes on error enums. (#16810)
Fixes these test failures:

    1) Failed : Cecil.Tests.EnumTest.NoAvailabilityOnError("/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/32bits/iOS/Xamarin.iOS.dll")
       CoreLocation.CLError.HistoricalLocationError
       Expected: <empty>
       But was:  < "CoreLocation.CLError.HistoricalLocationError" >
       at Cecil.Tests.EnumTest.NoAvailabilityOnError (System.String assemblyPath) [0x00067] in /Users/builder/azdo/_work/3/s/xamarin-macios/tests/cecil-tests/EnumTest.cs:29

    2) Failed : Cecil.Tests.EnumTest.NoAvailabilityOnError("/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/64bits/iOS/Xamarin.iOS.dll")
       CoreLocation.CLError.HistoricalLocationError
       Expected: <empty>
       But was:  < "CoreLocation.CLError.HistoricalLocationError" >
       at Cecil.Tests.EnumTest.NoAvailabilityOnError (System.String assemblyPath) [0x00067] in /Users/builder/azdo/_work/3/s/xamarin-macios/tests/cecil-tests/EnumTest.cs:29

    3) Failed : Cecil.Tests.EnumTest.NoAvailabilityOnError("/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/32bits/watchOS/Xamarin.WatchOS.dll")
       WatchKit.WKExtendedRuntimeSessionErrorCode.MustBeActiveToPrompt, WatchKit.WKExtendedRuntimeSessionErrorCode.UnsupportedSessionType, CoreLocation.CLError.HistoricalLocationError
       Expected: <empty>
       But was:  < "WatchKit.WKExtendedRuntimeSessionErrorCode.MustBeActiveToPrompt", "WatchKit.WKExtendedRuntimeSessionErrorCode.UnsupportedSessionType", "CoreLocation.CLError.HistoricalLocationError" >
       at Cecil.Tests.EnumTest.NoAvailabilityOnError (System.String assemblyPath) [0x00067] in /Users/builder/azdo/_work/3/s/xamarin-macios/tests/cecil-tests/EnumTest.cs:29

    4) Failed : Cecil.Tests.EnumTest.NoAvailabilityOnError("/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/64bits/tvOS/Xamarin.TVOS.dll")
       CoreLocation.CLError.HistoricalLocationError
       Expected: <empty>
       But was:  < "CoreLocation.CLError.HistoricalLocationError" >
       at Cecil.Tests.EnumTest.NoAvailabilityOnError (System.String assemblyPath) [0x00067] in /Users/builder/azdo/_work/3/s/xamarin-macios/tests/cecil-tests/EnumTest.cs:29

    5) Failed : Cecil.Tests.EnumTest.NoAvailabilityOnError("/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/Xamarin.Mac.dll")
       CoreLocation.CLError.HistoricalLocationError
       Expected: <empty>
       But was:  < "CoreLocation.CLError.HistoricalLocationError" >
       at Cecil.Tests.EnumTest.NoAvailabilityOnError (System.String assemblyPath) [0x00067] in /Users/builder/azdo/_work/3/s/xamarin-macios/tests/cecil-tests/EnumTest.cs:29

    6) Failed : Cecil.Tests.EnumTest.NoAvailabilityOnError("/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/4.5/Xamarin.Mac.dll")
       CoreLocation.CLError.HistoricalLocationError
       Expected: <empty>
       But was:  < "CoreLocation.CLError.HistoricalLocationError" >
       at Cecil.Tests.EnumTest.NoAvailabilityOnError (System.String assemblyPath) [0x00067] in /Users/builder/azdo/_work/3/s/xamarin-macios/tests/cecil-tests/EnumTest.cs:29
2022-11-21 09:16:40 +01:00
Rolf Bjarne Kvinge 349b045263
[tests] Don't run watchOS tests for .NET. (#16809)
Fixes these tests:

```
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).BuildMachineOSBuild: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).BundleDevelopmentRegion: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).BundleExecutable: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).BundleIdentifier: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).BundleInfoDictionaryVersion: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).BundleName: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).BundlePackageType: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).BundleSignature: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).BundleSupportedPlatforms: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).BundleVersion: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).DeviceFamily: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).MinimumOSVersion: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).MissingBundleIdentifier: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).MissingDisplayName: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).NormalPlist: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).NoWatchCompanion: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).PlistMissing: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).VerifyAllDT: System.InvalidOperationException : Invalid platform: WatchOS
* Xamarin.MacDev.Tasks.GeneratePlistTaskTests_watchOS_WatchKitExtension(True).XamarinVersion: System.InvalidOperationException : Invalid platform: WatchOS
```
2022-11-21 09:16:15 +01:00
dotnet-maestro[bot] 8976d0bff8
[main] Update dependencies from dotnet/installer (#16825)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: 50c9492e-4671-4d1d-7920-08dabd1031a2
- **Build**: 20221117.23
- **Date Produced**: November 18, 2022 12:09:07 AM UTC
- **Commit**: cf1b55e9735de4935c764e97a95c8fb87b87ebdc
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.101-servicing.22566.14 to 7.0.101-servicing.22567.23][3]

[3]: 7a63b1b...cf1b55e

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
2022-11-21 09:15:22 +01:00
TJ Lambert ea74ef3396
[Localization] Change the Cron Job to trigger weekend scheduled build (#16835)
I have been testing these changes inside the xamarin-macios-translations
pipeline.
The last run was green (found
[here](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=6984912&view=results)).
I had to use some placeholder code for the actual calls for the
OneLocBuild task that will communicate with the Loc Team but it reached
those points as expected!

This PR also rips out calls to the main-stage.yml template to only use
the stages necessary for the OneLocBuild run over the weekend!

I think these changes are set to see if the main branch can trigger the
OneLocBuild Task over the weekend build!

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-11-18 17:22:17 -06:00
Rolf Bjarne Kvinge 68ec0ffe88
[generator] Unify generation/copying of Obsolete attributes. (#16776)
Unify generation/copying of Obsolete attributes from api definitions to generated code.

This reduces code dupliation a bit, but it will also result in more
"[EditorBrowsable (Never)]" attributes (which we weren't generating in a few
cases).

In addition we're now copying Obsolete attributes for smart fields to the
generated code.
2022-11-18 16:46:41 +01:00
Rolf Bjarne Kvinge ae140f245a
[autoformat] Add the PassKit, PdfKit, Photos, PhotosUI, PrintCore, QTKit, QuickLookUI, ReplayKit, SafariServices, ScreenCaptureKit, ScriptingBridge and SearchKit frameworks. (#16775) 2022-11-18 15:21:16 +01:00
dotnet-maestro[bot] e5265aeb8d
[main] Update dependencies from dotnet/installer (#16797)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: 50c9492e-4671-4d1d-7920-08dabd1031a2
- **Build**: 20221116.14
- **Date Produced**: November 16, 2022 11:48:39 PM UTC
- **Commit**: 7a63b1bfae183bade22d4e67900f7d56745fa993
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.101-servicing.22565.2 to 7.0.101-servicing.22566.14][1]

[1]: d62cd31...7a63b1b

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
2022-11-18 08:08:27 +01:00
Rolf Bjarne Kvinge 1fe87884f4
[dotnet] Make sure to create a directory before we try to put files into it. (#16778)
Fixes this random build error:

    cp: Workloads/Microsoft.NET.Sdk.tvOS/LICENSE: clonefile failed: No such file or directory
    make[1]: *** [Makefile:193: Workloads/Microsoft.NET.Sdk.tvOS/LICENSE] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory '/Users/rolf/work/maccore/dotnet/xamarin-macios/dotnet'

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-18 08:03:01 +01:00
Rolf Bjarne Kvinge 1c29665f72
[tests] Ignore SWCollaborationView in DelegateAndSourceTest. (#16777)
[SWCollaborationView setDelegate:] crashes when passed null.

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-18 08:02:42 +01:00
Rolf Bjarne Kvinge 6812cc4b25
[static registrar] Handle metadata token lookup failure gracefully. (#16749)
Change the static registrar to fail gracefully if it can't compute a metadata token
for a given metadata item, and instead fall back to doing the lookup of whatever
we need at runtime.

This is a step towards making per-assembly static registrar working.

Ref: https://github.com/xamarin/xamarin-macios/issues/12067.

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-18 08:00:36 +01:00
Rolf Bjarne Kvinge 0a53f3cd60
Add automatic support for not building iOS 32-bit stuff when min iOS version is >= 11.0 (#16746)
There are no changes for 32-bit watchOS, because watchOS support is likely to
go away completely anyways.
2022-11-18 07:59:46 +01:00
Rolf Bjarne Kvinge ae0d5b534e
[perf] [runtime] Optimize startup by using function pointers instead of delegates for our native->managed bridge. (#16702)
Use function pointers to our managed callbacks instead of delegates for the native->managed bridge. This makes execution faster on AOT (because the AOT compiler can just emit the native function address, no need to go through the expensive marshalling machinery).

This involved a few changes to make the managed callbacks only use blittable types in the function signature:

* Use `sbyte` / `int8_t` instead of `bool`.
* Use pointers instead of `out`/`ref` arguments.
* Use `IntPtr` instead of `string` arguments.

The code rarely shows up in timing profiles before the change, and never after. This means that time-wise this doesn't save all that much, because there wasn't much to gain to begin with (but it's still a gain).

Memory-wise, we're now allocation 0,19 MiB less on startup (17,61 MiB vs 17,42 MiB).
2022-11-18 07:59:03 +01:00
Rolf Bjarne Kvinge ce895603a5
[autoformat] Add the rest of tools. (#16801) 2022-11-17 17:18:34 -05:00
Rolf Bjarne Kvinge 2f538ba790
[autoformat] Add the Network, NetworkExtension and NotificationCenter frameworks. (#16795) 2022-11-17 17:12:32 -05:00
Rolf Bjarne Kvinge 5e010e6700
[xharness] Fix typo when checking whether legacy Xamarin is enabled or not. (#16771)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-17 17:09:02 -05:00
Rolf Bjarne Kvinge 8ad9df8523
[autoformat] Add generator tests. (#16800) 2022-11-17 17:04:21 -05:00
Manuel de la Pena 232a680660
[Actions] Context typo. 2022-11-17 16:42:23 -05:00
Manuel de la Pena 6a6f6c89ff
[Actions] Update to use the title. 2022-11-17 16:36:31 -05:00
Manuel de la Pena bf8a12bc64
[Actions] Do not use the full commit. Just the head. (#16803) 2022-11-17 16:19:48 -05:00
Dean Ellis 3e4aa12a54
Do not copy files to build server for a Delete. (#16752)
The `Delete` task should not need to copy any files to the remote server.
Lets try to set this up by implementing the `ShouldCopyToBuildServer` method.

This should help reduce build times if it works.
2022-11-17 17:31:11 +01:00
Dean Ellis 30405fd9b5
[msbuild] Don't process assemblies over and over again in the UnpackLibraryResources target. Fixes #16377. (#16416)
Fixes #16377 

MSbuild has the ability to run `Target` partially. However in order to make sure we can use this, both the `Inputs` and `Outputs` need to have a 1-1 mapping. MSBuild will then use this mapping to figure out which files have actually changed.
Then it will call the Target with only those files. 

In Xamarin.Android we make use of stamp files to provide this 1-1 mapping. We have a `pre` Target which will calculate an ItemGroup which will include a StampFile piece of metadata. We then use this new ItemGroup for both the `Inputs` and `Outputs`, thus meeting the 1-1 requirement. 

This PR updates the `_UnpackLibraryResources` to run partially. This will hopefully reduce the build time on incremental builds.
2022-11-17 17:30:46 +01:00
Manuel de la Pena 0f0dd30878
[Actions] Add the action to perform a bump in the unified pipeline. (#16788) 2022-11-17 11:10:32 -05:00
Rolf Bjarne Kvinge 95783dbb50
[Foundation] Unify a few NSAttributedString functions. (#16782)
Unify the code for the following functions:

* NSAttributedString.GetData[FromRange]
* NSAttributedString.GetFileWrapper[FromRange]

These functions use 'ref' arguments instead of 'out' arguments for mobile
platforms (likely due to the generator not having proper 'out' parameter
support when these functions were implemented), so improve to use 'out'
parameters in XAMCORE_5_0 (and macOS, where they already use 'out'
parameters).

Also fix nullability.

Ref: https://github.com/xamarin/xamarin-macios/issues/15216
2022-11-17 15:51:19 +01:00
Rolf Bjarne Kvinge bedcbb063f
[Foundation] Remove support for '[NSAttributedString initWithFileURL:options:documentAttributes:error:]'. (#16787)
The 'initWithFileURL:options:documentAttributes:error:' was deprecated in iOS
9, and a new alternative (initWithURL:options:documentAttributes:error:) was
added. At the time, we implemented automatic detection of the current OS, and
would choose one version or the other depending on which was available.

We won't support anything below iOS 9 anymore, which means that keeping the
backwards-compatible constructor is useless, so just remove the corresponding
code and expose the new alternative directly.

On another note, this constructor uses a 'ref NSError' argument instead of an
'out NSError' on mobile platforms (likely due to the generator not having
proper 'out' parameter support when this constructor was implemented), so
improve to use 'out' parameters in XAMCORE_5_0 (and macOS, where it already
uses 'out' parameters).

Ref: https://github.com/xamarin/xamarin-macios/issues/15216
2022-11-17 15:45:11 +01:00
dotnet-maestro[bot] c74809e485
[main] Update dependencies from dotnet/installer (#16758)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: 50c9492e-4671-4d1d-7920-08dabd1031a2
- **Build**: 20221115.2
- **Date Produced**: November 15, 2022 5:40:05 PM UTC
- **Commit**: d62cd319ad79088d6075221e8edf36913af24e33
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
- **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.101-servicing.22563.3 to
7.0.101-servicing.22565.2][2]

[2]: cbfa597...d62cd31

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-11-17 13:17:54 +01:00
Rolf Bjarne Kvinge 3585c66844
[autoformat] Add common test files. (#16740) 2022-11-17 13:04:59 +01:00
Rolf Bjarne Kvinge 0a0076c6b0
[autoformat] Add the SceneKit framework. (#16780) 2022-11-17 13:04:46 +01:00
Rolf Bjarne Kvinge bd4394816a
[autoformat] Add UIKit. (#16779) 2022-11-17 13:02:14 +01:00
Rolf Bjarne Kvinge 7003d324ef
[tests] Don't build packaged macOS tests in parallel in CI. (#16785)
The random build failure it causes aren't worth it for the speed gain.
2022-11-17 13:00:43 +01:00
VS MobileTools Engineering Service 2 d6f9aa7c08
[main] Fix native watchOS app bundling when using newer Xcode 14 watchOS project. Fixes #16142. (#16773)
I've made some small edits to the ValidateWatchApp method to allow for a native watchOS app that was created in Xcode 14 that uses a single project instead of an extension to be bundled into a Xamarin app. 

Should fix #16142 and progress on #10070

Backport of #16690

Co-authored-by: Jack Butler <jbutler@glneurotech.com>
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-17 08:00:27 +01:00
Rolf Bjarne Kvinge f8fcd0e827
[devops] Set BUILD_REVISION globally. (#16772)
A lot of code in our repo uses the presence of the BUILD_REVISION environment
variable to determine whether we're running in CI or not, so just set the
variable globally once so that it's always set - that way we never forget to
set it.

Note that the exact value of the variable doesn't matter, only that it's set.
Also change one place in the yaml that was depending on the contents of the
BUILD_REVISION to use the Azure Devops variable BUILD_SOURCEVERSION instead
(like we do everywhere else in our yaml code).
2022-11-16 15:08:48 +01:00
Rolf Bjarne Kvinge 61b1811230
[CoreFoundation] A few minor nullability fixes in CFSocket. (#16761)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-16 14:54:38 +01:00
Manuel de la Pena d307589ebb
[DevOps] Use the correct hash for the comment. (#16766)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-16 06:55:45 -05:00
Rolf Bjarne Kvinge 3bbf06aef2
[xharness] Print more diagnostic code during and after the test run. (#16709)
* Print the load average every 15 minutes. Also print a full process list if
  the load average > 10.
* Print a full process list of the system every hour.
* Print a summary to stdout at the end of the test run.

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-16 07:55:53 +01:00
Rolf Bjarne Kvinge 07aeb79fa5
[generator] Fix warnings in api definitions. (#16729)
Fixes these warnings:

    appkit.cs(13128,8): warning CS0108: 'NSResponder.RestoreUserActivityState(NSUserActivity)' hides inherited member 'NSUserActivityRestoring.RestoreUserActivityState(NSUserActivity)'. Use the new keyword if hiding was intended.
	appkit.cs(19500,12): warning CS0109: The member 'NSTextView.Editable' does not hide an accessible member. The new keyword is not required.
	appkit.cs(19503,12): warning CS0109: The member 'NSTextView.Selectable' does not hide an accessible member. The new keyword is not required.
	appkit.cs(27481,14): warning CS0108: 'NSFontAssetRequest.Progress' hides inherited member 'NSProgressReporting.Progress'. Use the new keyword if hiding was intended.
	appkit.cs(5342,8): warning CS0108: 'NSController.DiscardEditing()' hides inherited member 'NSEditor.DiscardEditing()'. Use the new keyword if hiding was intended.
	appkit.cs(5346,8): warning CS0108: 'NSController.CommitEditing(NSObject, Selector, nint)' hides inherited member 'NSEditor.CommitEditing(NSObject, Selector, nint)'. Use the new keyword if hiding was intended.
	appkit.cs(5353,8): warning CS0108: 'NSController.ObjectDidBeginEditing(INSEditor)' hides inherited member 'NSEditorRegistration.ObjectDidBeginEditing(INSEditor)'. Use the new keyword if hiding was intended.
	appkit.cs(5356,8): warning CS0108: 'NSController.ObjectDidEndEditing(INSEditor)' hides inherited member 'NSEditorRegistration.ObjectDidEndEditing(INSEditor)'. Use the new keyword if hiding was intended.
	appkit.cs(5367,8): warning CS0108: 'NSController.CommitEditing()' hides inherited member 'NSEditor.CommitEditing()'. Use the new keyword if hiding was intended.
	appkit.cs(5974,8): warning CS0108: 'NSDocument.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)' hides inherited member 'NSUserInterfaceValidations.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)'. Use the new keyword if hiding was intended.
	appkit.cs(6113,8): warning CS0108: 'NSDocument.RestoreUserActivityState(NSUserActivity)' hides inherited member 'NSUserActivityRestoring.RestoreUserActivityState(NSUserActivity)'. Use the new keyword if hiding was intended.
	appkit.cs(6260,8): warning CS0108: 'NSDocumentController.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)' hides inherited member 'NSUserInterfaceValidations.ValidateUserInterfaceItem(INSValidatedUserInterfaceItem)'. Use the new keyword if hiding was intended.
	avfoundation.cs(4928,3): warning CS0618: 'AVSampleCursorSyncInfo' is obsolete: 'This API is not available on this platform.'
	avfoundation.cs(4931,3): warning CS0618: 'AVSampleCursorSyncInfo' is obsolete: 'This API is not available on this platform.'
	avfoundation.cs(4942,3): warning CS0618: 'AVSampleCursorStorageRange' is obsolete: 'This API is not available on this platform.'
	avfoundation.cs(4945,3): warning CS0618: 'AVSampleCursorChunkInfo' is obsolete: 'This API is not available on this platform.'
	avfoundation.cs(4951,3): warning CS0618: 'AVSampleCursorStorageRange' is obsolete: 'This API is not available on this platform.'
	carplay.cs(1622,8): warning CS0108: 'CPListImageRowItem.Enabled' hides inherited member 'CPListTemplateItem.Enabled'. Use the new keyword if hiding was intended.
	carplay.cs(1695,8): warning CS0108: 'CPMessageListItem.Enabled' hides inherited member 'CPListTemplateItem.Enabled'. Use the new keyword if hiding was intended.
	carplay.cs(576,8): warning CS0108: 'CPListItem.Enabled' hides inherited member 'CPListTemplateItem.Enabled'. Use the new keyword if hiding was intended.
	contacts.cs(1589,3): warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
	contacts.cs(1685,3): warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
	coredata.cs(1053,12): warning CS0109: The member 'NSManagedObjectContext.Lock()' does not hide an accessible member. The new keyword is not required.
	coredata.cs(1059,12): warning CS0109: The member 'NSManagedObjectContext.Unlock()' does not hide an accessible member. The new keyword is not required.
	coredata.cs(2066,12): warning CS0109: The member 'NSPersistentStoreCoordinator.Lock()' does not hide an accessible member. The new keyword is not required.
	coredata.cs(2072,12): warning CS0109: The member 'NSPersistentStoreCoordinator.Unlock()' does not hide an accessible member. The new keyword is not required.
	coreimage.cs(1731,88): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
	coreimage.cs(1798,81): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
	foundation.cs(459,21): error CS0246: The type or namespace name 'NSTextBlock' could not be found (are you missing a using directive or an assembly reference?)
	foundation.cs(463,21): error CS0246: The type or namespace name 'NSTextTable' could not be found (are you missing a using directive or an assembly reference?)
	gamecontroller.cs(2422,13): warning CS0108: 'GCDevicePhysicalInput.Device' hides inherited member 'GCDevicePhysicalInputState.Device'. Use the new keyword if hiding was intended.
	healthkit.cs(4208,237): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
	healthkit.cs(4208,247): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
	mapkit.cs(1892,12): warning CS0109: The member 'MKTileOverlay.CanReplaceMapContent' does not hide an accessible member. The new keyword is not required.
	metal.cs(1627,3): warning CS0618: 'MTLAccelerationStructureSizes' is obsolete: 'This API is not available on this platform.'
	notificationcenter.cs(82,3): warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
	PassKit/PKEnums.cs(193,11): warning CS0618: 'PKPaymentButtonType.Checkout' is obsolete: 'Use 'Checkout2'.'
	PassKit/PKEnums.cs(195,15): warning CS0618: 'PKPaymentButtonType.Book' is obsolete: 'Use 'Book2'.'
	pdfkit.cs(1454,76): warning CS0618: 'PdfPrintScalingMode' is obsolete: 'This type is not available on iOS.'
	pdfkit.cs(2020,53): warning CS0618: 'PdfPrintScalingMode' is obsolete: 'This type is not available on iOS.'
	scenekit.cs(1973,87): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
	sharedwithyou.cs(372,9): warning CS0108: 'SWHighlightChangeEvent.HighlightUrl' hides inherited member 'SWHighlightEvent.HighlightUrl'. Use the new keyword if hiding was intended.
	soundanalysis.cs(207,4): warning CS0657: 'return' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'property'. All attributes in this block will be ignored.
	uikit.cs(11490,44): warning CS0109: The member 'UIResponder.ActivityItemsConfiguration' does not hide an accessible member. The new keyword is not required.
	uikit.cs(11505,18): warning CS0109: The member 'UIResponder.TouchBar' does not hide an accessible member. The new keyword is not required.
	uikit.cs(11509,14): warning CS0108: 'UIResponder.TouchBar' hides inherited member 'NSTouchBarProvider.TouchBar'. Use the new keyword if hiding was intended.
	uikit.cs(292,3): warning CS0618: 'CategoryAttribute.CategoryAttribute(bool)' is obsolete: 'Inline the static members in this category in the category's class (and remove this obsolete once fixed)'
	usernotifications.cs(197,13): warning CS0618: 'UNNotificationInterruptionLevel.Critical' is obsolete: 'Use 'Critical2'.'
	usernotifications.cs(198,15): warning CS0618: 'UNNotificationInterruptionLevel.TimeSensitive' is obsolete: 'Use 'TimeSensitive2'.'
	usernotifications.cs(199,14): warning CS0618: 'UNNotificationInterruptionLevel.Active' is obsolete: 'Use 'Active2'.'
	usernotifications.cs(200,20): warning CS0618: 'UNNotificationInterruptionLevel.Passive' is obsolete: 'Use 'Passive2'.'
	xkit.cs(2068,15): warning CS0109: The member 'NSCollectionLayoutVisibleItem.Center' does not hide an accessible member. The new keyword is not required.
	xkit.cs(2073,14): warning CS0109: The member 'NSCollectionLayoutVisibleItem.Bounds' does not hide an accessible member. The new keyword is not required.

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-16 07:55:33 +01:00
Rolf Bjarne Kvinge 97eee84442
[tests] Ignore PassLibraryTest.PassLibraryTest on bots if PKPassLibrary.GetPasses returns null. Fixes #xamarin/maccore@2598. (#16738)
PKPassLibrary.GetPasses randomly returns null for no apparent rhyme or reason
on our bots, so just ignore the test in that case.

Maybe if someone can reproduce locally one day we'll be able to investigate
and figure out what's happening.

Fixes https://github.com/xamarin/maccore/issues/2598.
2022-11-16 07:54:57 +01:00