xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.42k stars 504 forks source link

[Foundation] Make P/Invokes have blittable signatures. #20539

Closed rolfbjarne closed 2 months ago

rolfbjarne commented 2 months ago

Contributes towards #15684.

vs-mobiletools-engineering-service2 commented 2 months ago

:books: [PR Build] Artifacts :books:

Packages generated

View packages * [xamarin.ios-17.3.0.396.pkg](https://dl.internalx.com/wrench/merge/1072023f121710f9ef1de0cd71bb96b126656d45/9504377/package/xamarin.ios-17.3.0.396.pkg) * [xamarin.mac-9.3.0.396.pkg](https://dl.internalx.com/wrench/merge/1072023f121710f9ef1de0cd71bb96b126656d45/9504377/package/xamarin.mac-9.3.0.396.pkg)

Pipeline on Agent Hash: [PR build]

vs-mobiletools-engineering-service2 commented 2 months ago

:computer: [PR Build] Tests on macOS X64 - Mac Sonoma (14) passed :computer:

:white_check_mark: All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent Hash: [PR build]

vs-mobiletools-engineering-service2 commented 2 months ago

:computer: [PR Build] Tests on macOS M1 - Mac Ventura (13) passed :computer:

:white_check_mark: All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent Hash: [PR build]

vs-mobiletools-engineering-service2 commented 2 months ago

:computer: [PR Build] Tests on macOS M1 - Mac Monterey (12) passed :computer:

:white_check_mark: All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent Hash: [PR build]

vs-mobiletools-engineering-service2 commented 2 months ago

:computer: [PR Build] Tests on macOS M1 - Mac Big Sur (11) passed :computer:

:white_check_mark: All tests on macOS M1 - Mac Big Sur (11) passed.

Pipeline on Agent Hash: [PR build]

vs-mobiletools-engineering-service2 commented 2 months ago

:computer: [CI Build] Windows Integration Tests passed :computer:

:white_check_mark: All Windows Integration Tests passed.

Pipeline on Agent Hash: 87374d047bb859797bdc4c1fd949c5223d29ed69 [PR build]

vs-mobiletools-engineering-service2 commented 2 months ago

:white_check_mark: API diff for current PR / commit

Legacy Xamarin (No breaking changes) * ~iOS~ (no change detected) * ~tvOS~ (no change detected) * ~watchOS~ (no change detected) * ~macOS~ (no change detected)
NET (empty diffs) * ~iOS~: (empty diff detected) * ~tvOS~: (empty diff detected) * ~MacCatalyst~: (empty diff detected) * ~macOS~: (empty diff detected)

:white_check_mark: API diff vs stable

Legacy Xamarin (No breaking changes) * iOS: [vsdrops](https://vsdrop.corp.microsoft.com/file/v1/xamarin-macios/detected-changes/20240430.4/9504377-1/;/stable-api-comparison/ios-api-diff.html) [gist](https://gist.github.com/vs-mobiletools-engineering-service2/e1b11f541493f515614b8733a1f8a834) (No breaking changes) * tvOS: [vsdrops](https://vsdrop.corp.microsoft.com/file/v1/xamarin-macios/detected-changes/20240430.4/9504377-1/;/stable-api-comparison/tvos-api-diff.html) [gist](https://gist.github.com/vs-mobiletools-engineering-service2/8fca56c8653f67239fa6a187cd5bdf75) (No breaking changes) * watchOS: [vsdrops](https://vsdrop.corp.microsoft.com/file/v1/xamarin-macios/detected-changes/20240430.4/9504377-1/;/stable-api-comparison/watchos-api-diff.html) [gist](https://gist.github.com/vs-mobiletools-engineering-service2/f55a9c7dd3b7ada32d08934e4b90a529) (No breaking changes) * macOS: [vsdrops](https://vsdrop.corp.microsoft.com/file/v1/xamarin-macios/detected-changes/20240430.4/9504377-1/;/stable-api-comparison/mac-api-diff.html) [gist](https://gist.github.com/vs-mobiletools-engineering-service2/0b43ca080e1e74b645dded7acfc4d209) (No breaking changes)
.NET (No breaking changes) * iOS: [vsdrops](https://vsdrop.corp.microsoft.com/file/v1/xamarin-macios/detected-changes/20240430.4/9504377-1/;/stable-api-comparison/diff/dotnet/Microsoft.iOS.Ref/ref/net8.0/Microsoft.iOS.html) [gist](https://gist.github.com/vs-mobiletools-engineering-service2/283d3db6147f4a7e6f9b4c32c29f2f1c) (No breaking changes) * tvOS: [vsdrops](https://vsdrop.corp.microsoft.com/file/v1/xamarin-macios/detected-changes/20240430.4/9504377-1/;/stable-api-comparison/diff/dotnet/Microsoft.tvOS.Ref/ref/net8.0/Microsoft.tvOS.html) [gist](https://gist.github.com/vs-mobiletools-engineering-service2/a13eb4eb97ec751e62879ab4a5a3700d) (No breaking changes) * MacCatalyst: [vsdrops](https://vsdrop.corp.microsoft.com/file/v1/xamarin-macios/detected-changes/20240430.4/9504377-1/;/stable-api-comparison/diff/dotnet/Microsoft.MacCatalyst.Ref/ref/net8.0/Microsoft.MacCatalyst.html) [gist](https://gist.github.com/vs-mobiletools-engineering-service2/02bad1b4fa0f3ff2a00407a82869121e) (No breaking changes) * macOS: [vsdrops](https://vsdrop.corp.microsoft.com/file/v1/xamarin-macios/detected-changes/20240430.4/9504377-1/;/stable-api-comparison/diff/dotnet/Microsoft.macOS.Ref/ref/net8.0/Microsoft.macOS.html) [gist](https://gist.github.com/vs-mobiletools-engineering-service2/01ccefcf015ac50e814adfa7bcfebe64) (No breaking changes) * Microsoft.iOS vs Microsoft.MacCatalyst: [vsdrops](https://vsdrop.corp.microsoft.com/file/v1/xamarin-macios/detected-changes/20240430.4/9504377-1/;/stable-api-comparison/diff/dotnet/iOS-MacCatalyst-diff/Microsoft.iOS.Ref/ref/net8.0/Microsoft.iOS.MacCatalyst.html) [gist](https://gist.github.com/vs-mobiletools-engineering-service2/806264a8d9406a9726bc4c1c5780162f)
Legacy Xamarin (stable) vs .NET * iOS: [vsdrops](https://vsdrop.corp.microsoft.com/file/v1/xamarin-macios/detected-changes/20240430.4/9504377-1/;/stable-api-comparison/diff/dotnet/legacy-diff/Microsoft.iOS.Ref/ref/net8.0/Microsoft.iOS.html) [gist](https://gist.github.com/vs-mobiletools-engineering-service2/e8eacf5e32b470b538ab7a0f3742d2d3) * tvOS: [vsdrops](https://vsdrop.corp.microsoft.com/file/v1/xamarin-macios/detected-changes/20240430.4/9504377-1/;/stable-api-comparison/diff/dotnet/legacy-diff/Microsoft.tvOS.Ref/ref/net8.0/Microsoft.tvOS.html) [gist](https://gist.github.com/vs-mobiletools-engineering-service2/bbf2a68a7095d55156aeafaa1c0a6dee) * macOS: [vsdrops](https://vsdrop.corp.microsoft.com/file/v1/xamarin-macios/detected-changes/20240430.4/9504377-1/;/stable-api-comparison/diff/dotnet/legacy-diff/Microsoft.macOS.Ref/ref/net8.0/Microsoft.macOS.html) [gist](https://gist.github.com/vs-mobiletools-engineering-service2/f1c1d808513361aed9876b3e1c204fdd)

:information_source: Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent Hash: 87374d047bb859797bdc4c1fd949c5223d29ed69 [PR build]

vs-mobiletools-engineering-service2 commented 2 months ago

:fire: [CI Build] Test results :fire:

Test results

:x: Tests failed on VSTS: test results

2 tests crashed, 15 tests failed, 158 tests passed.

Failures

:x: monotouch tests (iOS)

7 tests failed, 6 tests passed.
* monotouch-test/iOS Unified 64-bits - simulator/Debug (LinkSdk) [dotnet]: HarnessException (Harness exception for 'monotouch-test': System.AggregateException: One or more errors occurred. (A task was canceled.) ---> System.Threading.Tasks.TaskCanceledException: A task was canceled. at System.Threading.Tasks.Task.GetExceptions(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.DotNet.XHarness.iOS.Shared.TestReporter.get_TestExecutionStarted() at Microsoft.DotNet.XHarness.iOS.Shared.TestReporter.ParseResult() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.DotNet.XHarness.iOS.Shared.TestReporter.ParseResult() at Xharness.AppRunner.RunAsync() in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/AppRunner.cs:line 453 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread) at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining) at System.Threading.Tasks.Task.RunContinuations(Object continuationObject) at Microsoft.DotNet.XHarness.Common.Execution.ProcessManager.ExecuteCommandAsync(String filename, IList`1 args, ILog log, ILog stdout, ILog stderr, TimeSpan timeout, Dictionary`2 environmentVariables, Nullable`1 cancellationToken) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread) at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining) at System.Threading.Tasks.Task.RunContinuations(Object continuationObject) at Microsoft.DotNet.XHarness.Common.Execution.ProcessManager.RunAsyncInternal(Process process, ILog log, ILog stdout, ILog stderr, Action`2 kill, Func`3 getChildProcessIds, Nullable`1 timeout, Dictionary`2 environmentVariables, Nullable`1 cancellationToken, Nullable`1 diagnostics) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread) at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining) at System.Threading.Tasks.Task.RunContinuations(Object continuationObject) at Microsoft.DotNet.XHarness.Common.Execution.ProcessManager.WaitForExitAsync(Process process, Nullable`1 timeout) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread) at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining) at System.Threading.Tasks.Task.RunContinuations(Object continuationObject) at Microsoft.DotNet.XHarness.Common.Utilities.Extensions.TimeoutAfter[T](Task`1 task, TimeSpan timeout) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread) at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining) at System.Threading.Tasks.Task.RunContinuations(Object continuationObject) at System.Threading.Tasks.Task.TwoTaskWhenAnyPromise`1.Invoke(Task completingTask) at System.Threading.Tasks.Task.RunContinuations(Object continuationObject) at System.Diagnostics.Process.OnExited() at System.Diagnostics.Process.RaiseOnExited() at System.Diagnostics.Process.CompletionCallback(Object waitHandleContext, Boolean wasSignaled) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.PortableThreadPool.CompleteWait(RegisteredWaitHandle handle, Boolean timedOut) at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() at System.Threading.Thread.StartCallback() --- End of stack trace from previous location --- --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.DotNet.XHarness.iOS.Shared.TestReporter.get_TestExecutionStarted() at Microsoft.DotNet.XHarness.iOS.Shared.TestReporter.ParseResult() at Xharness.AppRunner.RunAsync() in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/AppRunner.cs:line 453 at Xharness.Jenkins.TestTasks.RunSimulator.RunTestAsync() in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:line 128 at Xharness.Jenkins.TestTasks.RunTest.ExecuteAsync() in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunTest.cs:line 113 at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync() in /Users/builder/azdo/_work/2/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:line 269) * monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations) [dotnet]: Failed * monotouch-test/iOS Unified 64-bits - simulator/Debug (ARM64) [dotnet]: Failed * monotouch-test/iOS Unified 64-bits - simulator/Debug (managed static registrar) [dotnet]: Failed * monotouch-test/iOS Unified 64-bits - simulator/Release (managed static registrar, all optimizations) [dotnet]: Failed * monotouch-test/iOS Unified 64-bits - simulator/Release (NativeAOT, x64) [dotnet]: Failed * monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar): Failed

Html Report (VSDrops) Download

:x: monotouch tests (tvOS)

6 tests failed, 7 tests passed.
* monotouch-test/tvOS - simulator/Debug [dotnet]: Failed * monotouch-test/tvOS - simulator/Debug: Failed * monotouch-test/tvOS - simulator/Release (NativeAOT, ARM64) [dotnet]: Failed * monotouch-test/tvOS - simulator/Debug (managed static registrar) [dotnet]: Failed * monotouch-test/tvOS - simulator/Release (managed static registrar, all optimizations) [dotnet]: Failed * monotouch-test/tvOS - simulator/Release (all optimizations): Failed

Html Report (VSDrops) Download

:x: msbuild tests

:fire: Failed catastrophically on VSTS: test results - msbuild (no summary found).

Html Report (VSDrops) Download

:x: mtouch tests

:fire: Failed catastrophically on VSTS: test results - mtouch (no summary found).

Html Report (VSDrops) Download

:x: xammac tests

2 tests failed, 3 tests passed.
* xammac tests/Mac Modern/Debug (ARM64): Failed (Test run failed. Tests run: 2935 Passed: 2832 Inconclusive: 9 Failed: 2 Ignored: 101) * xammac tests/Mac Modern/Release (ARM64): Failed (Test run failed. Tests run: 2932 Passed: 2829 Inconclusive: 9 Failed: 2 Ignored: 101)

Html Report (VSDrops) Download

Successes

:white_check_mark: cecil: All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: framework: All 8 tests passed. Html Report (VSDrops) Download :white_check_mark: fsharp: All 7 tests passed. Html Report (VSDrops) Download :white_check_mark: generator: All 2 tests passed. Html Report (VSDrops) Download :white_check_mark: install-source: All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: interdependent-binding-projects: All 7 tests passed. Html Report (VSDrops) Download :white_check_mark: introspection: All 8 tests passed. Html Report (VSDrops) Download :white_check_mark: linker: All 65 tests passed. Html Report (VSDrops) Download :white_check_mark: mac-binding-project: All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: mmp: All 2 tests passed. Html Report (VSDrops) Download :white_check_mark: mononative: All 6 tests passed. Html Report (VSDrops) Download :white_check_mark: monotouch (MacCatalyst): All 7 tests passed. Html Report (VSDrops) Download :white_check_mark: monotouch (macOS): All 8 tests passed. Html Report (VSDrops) Download :white_check_mark: monotouch (watchOS): All 4 tests passed. Html Report (VSDrops) Download :white_check_mark: xcframework: All 8 tests passed. Html Report (VSDrops) Download :white_check_mark: xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent Hash: [PR build]

vs-mobiletools-engineering-service2 commented 2 months ago

:rocket: [CI Build] Test results :rocket:

Test results

:white_check_mark: All tests passed on VSTS: test results.

:tada: All 170 tests passed :tada:

Tests counts

:white_check_mark: cecil: All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: framework: All 8 tests passed. Html Report (VSDrops) Download :white_check_mark: fsharp: All 7 tests passed. Html Report (VSDrops) Download :white_check_mark: generator: All 2 tests passed. Html Report (VSDrops) Download :white_check_mark: install-source: All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: interdependent-binding-projects: All 7 tests passed. Html Report (VSDrops) Download :white_check_mark: introspection: All 8 tests passed. Html Report (VSDrops) Download :white_check_mark: linker: All 65 tests passed. Html Report (VSDrops) Download :white_check_mark: mac-binding-project: All 1 tests passed. Html Report (VSDrops) Download :white_check_mark: mmp: All 2 tests passed. Html Report (VSDrops) Download :white_check_mark: mononative: All 6 tests passed. Html Report (VSDrops) Download :white_check_mark: monotouch (iOS): All 11 tests passed. [attempt 2] Html Report (VSDrops) Download :white_check_mark: monotouch (MacCatalyst): All 7 tests passed. Html Report (VSDrops) Download :white_check_mark: monotouch (macOS): All 8 tests passed. Html Report (VSDrops) Download :white_check_mark: monotouch (tvOS): All 11 tests passed. [attempt 2] Html Report (VSDrops) Download :white_check_mark: monotouch (watchOS): All 4 tests passed. Html Report (VSDrops) Download :white_check_mark: msbuild: All 2 tests passed. [attempt 2] Html Report (VSDrops) Download :white_check_mark: mtouch: All 1 tests passed. [attempt 2] Html Report (VSDrops) Download :white_check_mark: xammac: All 3 tests passed. [attempt 2] Html Report (VSDrops) Download :white_check_mark: xcframework: All 8 tests passed. Html Report (VSDrops) Download :white_check_mark: xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent Hash: [PR build]