Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[net8.0] Merge main into net8.0 #18770

Merged
merged 13 commits into from
Aug 22, 2023

Conversation

filipnavara
Copy link
Contributor

Test PR: #18742 with workaround for dotnet/runtime#90800

simonrozsival and others added 12 commits August 15, 2023 08:30
…using reflection in the managed static registrar (xamarin#18519)

This PR adds lookup tables and factory methods for INativeObjects and
NSObjects. These generated methods allow us to create instances of these
objects without needing reflection.

Closes xamarin#18358.
The .mobile.props file is a file created and written by the mobile VS
extension to store property values that needs to be read early enough in
the build chain, as in design time builds, and that can't be set by CPS
because of a limitation in the project system. See more information
here: xamarin/XamarinVS#13606

Initially it was named .user.env file and then was renamed in another PR
as part of a feedback from the project system team. See more information
here: xamarin/XamarinVS#13628

Because this file was saved in the intermediate output path, it was
meant to be imported automatically by MSBuild, however we recently
detected that this was not happening reliably. Because of this, some
things like C# Hot Reload for iOS stopped working because Roslyn was
reading incorrect values from the Design Time Builds.

For that reason and to avoid relying on the project system, I'm
importing this file explicitly (and removing old .user.env import), so
the values in the file are always available and the dependent properties
are calculated correctly and available for all the consumers (including
Roslyn).

This should fix the following bugs:

https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1822041
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1851677
…8570. (xamarin#18724)

This is a bit non-obvious, but we later use the presence of such a
stored list to determine if we need to generate the __Registrar__ type in the
assembly.

The problem is that we need to generate the __Registrar__ type even if
no trampolines were created, because we use it for numerous other purposes
as well (type lookup for instance).

Fixes xamarin#18570.
* Remove unusued code.
* Rename method to make it follow the common TryGet... pattern.
…#18722)

XDocument.Load(string) takes a URI, not a file path. This usually works if
there are no special characters in the file path, but for instance with a path
with a colon (say 'a:b/some/file'), we'll get an exception about invalid uri
scheme.

So instead use the XDocument.Load(Stream) overload, and create the stream
using the file path instead, in which case there's no problem with special
characters.
… it doesn't bubble up to the CI. (xamarin#18723)

This seems to happen fairly often:

    + xcrun simctl diagnose -b -X --output=/Users/builder/azdo/_work/1/s/diagnostic-sim-output/output
    Error creating archive at '/Users/builder/azdo/_work/1/s/diagnostic-sim-output/output.tar.gz'.
    Files are still in /Users/builder/azdo/_work/1/s/diagnostic-sim-output/output
    An error was encountered processing the command
    (domain=NSPOSIXErrorDomain, code=17):
       Unable to write or file already exists
       File exists

The output directory is empty (created in the line before), so I have no
idea what's going on.

An archive with the diagnostic info still seems to be created though, so
just ignore any failures from 'simctl diagnose' instead of bubbling them up
to Azure DevOps. This makes our test runs not show up with warnings.
…ironment variables. (xamarin#18738)

Setting test configuration variables using the environment is useful
when running tests on a Windows machine (easier than having to deal with
make).

Also refactor the code a bit to not use constants, and more consistent
naming.
…on Windows. (xamarin#18737)

This makes it easier to run some tests on Windows, because the tests
reference this file and by having it checked in it doesn't need to be generated
(which we currently do using make, which isn't trivial on Windows).

Also adjust the generated output slightly to make it easier on the eyes.
@filipnavara filipnavara changed the base branch from main to net8.0 August 19, 2023 11:37
@simonrozsival
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@simonrozsival
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Windows Integration Tests passed 💻

All Windows Integration Tests passed.

Pipeline on Agent
Hash: 1ddcc87bafb2d835d19b15f92239192d90e579aa [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻

All tests on macOS M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻

All tests on macOS M1 - Mac Ventura (13.0) passed.

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ 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)

✅ API diff vs stable

Legacy Xamarin (No breaking changes)
.NET (No breaking changes)
Legacy Xamarin (stable) vs .NET

ℹ️ Generator diff

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

Pipeline on Agent
Hash: 1ddcc87bafb2d835d19b15f92239192d90e579aa [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@ivanpovazan
Copy link
Contributor

@filipnavara sorry I don't have bandwidth atm to go deeper into the failures apart from providing the logs to you, hope this is fine:

  • monotouch tests are not related as 6 of them are timing out:
TestExtendedFileEvents: System.AggregateException : One or more errors occurred. (test has timed out at 10s; increase the timeout or reduce the number of files created. Created directories: 16 Created files: 256 Removed files: 0 Created then removed files: 256)
----> System.TimeoutException : test has timed out at 10s; increase the timeout or reduce the number of files created. Created directories: 16 Created files: 256 Removed files: 0 Created then removed files: 256
TestFileEvents: System.AggregateException : One or more errors occurred. (test has timed out at 10s; increase the timeout or reduce the number of files created. Created directories: 16 Created files: 256 Removed files: 0 Created then removed files: 256)
----> System.TimeoutException : test has timed out at 10s; increase the timeout or reduce the number of files created. Created directories: 16 Created files: 256 Removed files: 0 Created then removed files: 256
  • dotnettests tests:
Failure: Execution failed with exit code 1
Project file: /Users/builder/azdo/_work/1/s/xamarin-macios/tests/dotnet/UnitTests/DotNetUnitTests.csproj
Platform: Configuration: Debug
Build duration: 00:00:15.4852213
Time Elapsed: DotNet tests - (waiting time : 00:00:00.0000007 , running time : 03:23:50.2098464)

Xamarin.Tests.PackTest.BindingXcFrameworksProject(TVOS,False): 'dotnet pack' failed with exit code 1
Full command: /Users/builder/azdo/_work/1/s/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23378.5/dotnet pack /Users/builder/azdo/_work/1/s/xamarin-macios/tests/bindings-xcframework-test/dotnet/tvOS/bindings-xcframework-test.csproj /p:_BundlerVerbosity=1 /p:OutputPath=/Users/builder/azdo/_work/1/s/xamarin-macios/tests/dotnet/UnitTests/bin/Debug/net8.0/tmp-test-dir/Xamarin.Tests.PackTest.BindingXcFrameworksProject58/OutputPath/ /p:IntermediateOutputPath=/Users/builder/azdo/_work/1/s/xamarin-macios/tests/dotnet/UnitTests/bin/Debug/net8.0/tmp-test-dir/Xamarin.Tests.PackTest.BindingXcFrameworksProject58/IntermediateOutputPath/ /p:NoBindingEmbedding=false /bl:/Users/builder/azdo/_work/1/s/xamarin-macios/tests/bindings-xcframework-test/dotnet/tvOS/log-pack-20230819_204539.binlog /v:diag /consoleloggerparameters:Verbosity=Quiet
Listing first 1 error(s) (of 1 error(s)):
/Users/builder/azdo/_work/1/s/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23378.5/packs/Microsoft.tvOS.Sdk/16.4.8786-ci.pr.gh18770/tools/msbuild/iOS/Xamarin.Shared.targets(535): error MSB4018: The "CompileAppManifest" task failed unexpectedly.
System.IO.IOException: The process cannot access the file '/Users/builder/azdo/_work/1/s/xamarin-macios/tests/dotnet/UnitTests/bin/Debug/net8.0/tmp-test-dir/Xamarin.Tests.PackTest.BindingXcFrameworksProject58/IntermediateOutputPath/AppManifest.plist' because it is being used by another process.
at Microsoft.Win32.SafeHandles.SafeFileHandle.Init(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Int64& fileLength, UnixFileMode& filePermissions)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
at System.IO.FileSystem.TryCloneFile(String sourceFullPath, String destFullPath, Boolean overwrite, Boolean& cloned)
at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
at Xamarin.Utils.FileUtils.UpdateFile(String targetFile, Action`1 createOutput) in /Users/builder/azdo/_work/3/s/xamarin-macios/tools/common/FileUtils.cs:line 70
at Xamarin.MacDev.Tasks.CompileAppManifestTaskBase.Execute() in /Users/builder/azdo/_work/3/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileAppManifestTaskBase.cs:line 167
at Xamarin.MacDev.Tasks.CompileAppManifest.Execute() in /Users/builder/azdo/_work/3/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileAppManifest.cs:line 16
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
  • xcframework tests:
Project file: /Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac/xcframework-test-mac.csproj
Platform: x86 Configuration: Debug
Build duration: 00:00:37.1720002
Time Elapsed: xcframework-test - (waiting time : 00:00:00 , running time : 00:00:38.9790991)

[18:36:20.0472260] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/ExcludedCategoryFilter.cs(4,7): error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0476780] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/ExcludedCategoryFilter.cs(5,7): error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0478360] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/NUnitOutputTextWriter.cs(26,7): error CS0246: The type or namespace name 'NUnitLite' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0479070] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TestRocks.cs(24,7): error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0479830] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TestRocks.cs(25,7): error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0480740] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TestRocks.cs(27,7): error CS0246: The type or namespace name 'NUnitLite' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0481650] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TestRocks.cs(28,7): error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0482390] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs(47,7): error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0483100] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs(48,7): error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0483940] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs(49,7): error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0484740] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs(51,7): error CS0246: The type or namespace name 'NUnitLite' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0485310] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs(52,7): error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0485950] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs(53,7): error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0486490] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs(73,42): error CS0246: The type or namespace name 'ITestListener' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0487130] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs(939,26): error CS0246: The type or namespace name 'TestFilter' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0487640] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/ExcludedCategoryFilter.cs(8,32): error CS0246: The type or namespace name 'TestFilter' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0488150] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/ExcludedCategoryFilter.cs(16,35): error CS0246: The type or namespace name 'TNode' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0489070] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/ExcludedCategoryFilter.cs(16,19): error CS0246: The type or namespace name 'TNode' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0489580] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs(944,35): error CS0246: The type or namespace name 'TNode' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0490420] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs(944,19): error CS0246: The type or namespace name 'TNode' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]
[18:36:20.0491500] /Users/builder/azdo/_work/3/s/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/ExcludedCategoryFilter.cs(21,31): error CS0246: The type or namespace name 'ITest' could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/azdo/_work/3/s/xamarin-macios/tests/xharness/tmp-test-dir/xcframework-test-mac302/Touch.Client-macOS-mobile.csproj]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build] Test results 🚀

Test results

✅ All tests passed on VSTS: simulator tests.

🎉 All 227 tests passed 🎉

Tests counts

✅ bcl: All 69 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 2 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ introspection: All 8 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac_binding_project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 6 tests passed. Html Report (VSDrops) Download
✅ monotouch: All 38 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 1ddcc87bafb2d835d19b15f92239192d90e579aa [PR build]

@rolfbjarne rolfbjarne merged commit 2091e09 into xamarin:net8.0 Aug 22, 2023
@rolfbjarne rolfbjarne added the community Community contribution ❤ label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution ❤
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants