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

6417 Коммитов

Автор SHA1 Сообщение Дата
Peter Collins abe065f639
[ci] Add parameter to disable classic signing (#18142)
A new parameter has been added to allow the unified pipeline to skip
classic signing jobs.

The jobs that would sign and notarize the custom workload .pkg and .zip
files have been removed, as we do not ship these anywhere and do not
need to wait on signing for them.  The `dotnet-signed` artifact has been
removed as a result, and the `not-signed-package` artifact is used in
its place.
2023-04-27 12:40:21 -04:00
Rolf Bjarne Kvinge bc272a9446
[tests] Find a workaround for #xamarin/maccore@2668. (#18159)
1. Mono changed dyld lookup to start looking in directories in
   NATIVE_DLL_SEARCH_DIRECTORIES before the actual given path, even when the
   given path is absolute [1].
2. This turned out to break Mac Catalyst, because when a DllImport says a
   P/Invoke is in "/System/Library/Frameworks/SceneKit.framework/SceneKit",
   Mono would try loading by prefixing the directories in
   NATIVE_DLL_SEARCH_DIRECTORIES. We add the Contents/MonoBundle directory to
   NATIVE_DLL_SEARCH_DIRECTORIES, so Mono would try to load
   "/path/to/my.app/Contents/MonoBundle//System/Library/Frameworks/SceneKit.framework/SceneKit",
   and things would go wrong.
3. We found a workaround: add "/" to NATIVE_DLL_SEARCH_DIRECTORIES. This works
   on Ventura, but apparently not on older macOS version, because the actual
   path we pass to dlopen ends up being "///System/Library/Frameworks/SceneKit.framework/SceneKit"
   (note the three initial slashes instead of a single slash).
4. Add a second workaround, where we add a dll import resolver to load exactly
   the path we want to load.

[1]: 5a1baebc09
[2]: https://github.com/dotnet/runtime/pull/85255

Technical sidenote:

Why trying to load "/path/to/my.app/Contents/MonoBundle//System/Library/Frameworks/SceneKit.framework/SceneKit"
turned out so bad on Mac Catalyst is not obvious. What happens is this:

* The app calls 'dlopen ("/path/to/my.app/Contents/MonoBundle//System/Library/Frameworks/SceneKit.framework/SceneKit")'
* dlopen checks if this is a Mac Catalyst override of a macOS system
  framework, by prefixing "/System/iOSSupport" and trying to load that. So
  dlopen would try to load "/System/iOSSupport/path/to/my.app/Contents/MonoBundle//System/Library/Frameworks/SceneKit.framework/SceneKit",
  which would obviously fail.
* Then dlopen would try a few more fallbacks, eventually trying
  "/System/Library/Frameworks/SceneKit.framework/SceneKit", and successfully
  loading that library.
* Unfortunately "/System/Library/Frameworks/SceneKit.framework/SceneKit" is
  the wrong library to load for Mac Catalyst ("/System/iOSSupport/System/Library/Frameworks/SceneKit.framework/SceneKit"
  is the correct version). These two libraries are incompatible, and calling
  one when you mean to call the other will do nasty things like corrupting the
  stack.
2023-04-27 18:17:33 +02:00
Rolf Bjarne Kvinge bdf25df990
[tests] Allow a little bit of leeway when testing floating point numbers in SKTransformNodeTest. (#18157)
Fixes this test failure:

    MonoTouchFixtures.SpriteKit.SKTransformNodeTest
        [FAIL] EulerAngles :   #x1
            Expected: -2.14159298f
            But was:  -2.14159274f
2023-04-27 17:55:49 +02:00
Rolf Bjarne Kvinge 59d8370d6f
[tests] Fix finding instructions that take methods in cecil-tests. (#18138)
The calli instruction calls a function pointer on the stack, not a specific
managed function, so don't include it when looking for calls to managed functions.
2023-04-26 15:25:07 +02:00
Rolf Bjarne Kvinge f05ecfaf7e
[tests] Make any ObjCRuntime.Messaging internal. (#18130)
This fixes ~1600 warnings like these:

     warning CS0436: The type 'Messaging' in 'xamarin-macios/tests/monotouch-test/ObjCRuntime/Messaging.cs' conflicts with the imported type 'Messaging' in 'bindings-test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'
2023-04-26 15:23:00 +02:00
Rolf Bjarne Kvinge d780c72d6d [net8.0] Merge main into net8.0. 2023-04-25 08:30:30 +02:00
Rolf Bjarne Kvinge f9a87d52e8
[net8.0] [maestro] Remove .NET 7 emscripten dependency and bump the .NET 8 dependency. (#18102)
It fails to update:

    Coherency updates failed for the following dependencies:
      Unable to update Microsoft.NET.Workload.Emscripten.net7.Manifest-7.0.100 to have coherency with Microsoft.NETCore.App.Ref: https://github.com/dotnet/runtime @ db7ca5d87eb3cd83bbc77487eb97dec07f74abf8 does not contain dependency Microsoft.NET.Workload.Emscripten.net7.Manifest-7.0.100
        - Add the dependency to https://github.com/dotnet/runtime.
        - Pin the dependenency.
        - Remove the CoherentParentDependency attribute.

Once removed, bumping the .NET 8 dependency works again, so do that.
2023-04-25 07:46:20 +02:00
Rolf Bjarne Kvinge c9cb8ca5e3
[AppKit] Add a few missing NullAllowed attributes. Fixes #18115. (#18118)
Fixes https://github.com/xamarin/xamarin-macios/issues/18115.
2023-04-25 07:44:38 +02:00
Rolf Bjarne Kvinge d010844076
[introspection] Ignore the AddressBook namespace for Mac Catalyst when checking static cctors. (#18088)
Fixes these test failures (which only happen on the bots):

    [FAIL] AddressBook.InitConstants .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABGroupProperty .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABGroupProperty' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABGroupProperty..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonPropertyId .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonPropertyId' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonPropertyId..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonAddressKey .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonAddressKey' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonAddressKey..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonDateLabel .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonDateLabel' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonDateLabel..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonKindId .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonKindId' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonKindId..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonPhoneLabel .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonPhoneLabel' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonPhoneLabel..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonInstantMessageService .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonInstantMessageService' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonInstantMessageService..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonInstantMessageKey .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonInstantMessageKey' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonInstantMessageKey..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonUrlLabel .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonUrlLabel' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonUrlLabel..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonRelatedNamesLabel .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonRelatedNamesLabel' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonRelatedNamesLabel..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABLabel .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABLabel' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABLabel..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABSourcePropertyId .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABSourcePropertyId' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABSourcePropertyId..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
2023-04-21 18:48:22 +02:00
Rolf Bjarne Kvinge ce19b092c2 [net8.0] Merge main into net8.0. 2023-04-21 12:31:53 +02:00
Rolf Bjarne Kvinge 8e6104c497 [tests] Add a HotRestart version of the BundleStructure test. 2023-04-20 18:21:17 +02:00
Rolf Bjarne Kvinge d6195febf1 [tests] Find the .NET executable using the DOTNET environment variable as well.
It's much easier to set an environment variable on Windows than it is to change the
test configuration, which is Makefile-based.
2023-04-20 18:21:17 +02:00
Rolf Bjarne Kvinge 5511849baa [tests] Add support for creating temporary directories on Windows. 2023-04-20 18:21:17 +02:00
Rolf Bjarne Kvinge e8c8f0056a
[AVFoundation] Fix callback signature for the AVAudioSinkNode constructor. Fixes #17575. (#17785)
The callback to the AVAudioSinkNode constructor was declared incorrectly, and
if used, the app would crash at runtime.

This fix does a few things:

* Creates an overload with callback signature that matches the native API
  (using IntPtrs).
* Writes a custom version for the broken callback signature to make it work
  (and this overload is obsoleted, and removed in XAMCORE_5_0).
* Adds a third overload with the ideal signature.
* Adds tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/17575.
2023-04-20 13:15:49 +02:00
Rolf Bjarne Kvinge 736662d8ee
[tests] Remove files from the generator tests to fix compiler warnings. (#18092)
Also fix a nullability warning.

Fixes these warnings:

    "tests/generator/generator-tests.csproj" (default target) (1:7) ->
    (CoreCompile target) ->
      tests/generator/AttributeFactoryTests.cs(43,29): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(44,29): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(45,29): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(17,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(34,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(53,39): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(54,39): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(55,39): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(56,39): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(64,34): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(69,11): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(76,34): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(55,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(83,34): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(78,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(111,16): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(138,16): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(95,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(178,16): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(116,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.]
      tests/generator/ConstructorArgumentsTests.cs(194,18): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.]
      tests/generator/ConstructorArgumentsTests.cs(210,18): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.]
      tests/generator/ConstructorArgumentsTests.cs(197,44): warning CS8602: Dereference of a possibly null reference.
      tests/generator/ConstructorArgumentsTests.cs(201,43): warning CS8602: Dereference of a possibly null reference.
2023-04-20 07:34:30 +02:00
Rolf Bjarne Kvinge 9615de3334
[dotnet] Include the parsed runtimeconfig.bin into ResolvedFileToPublish. Contributes towards #17579. (#18087)
This makes it unnecessary to special-case this file for it to copied
correctly when building on Windows (once we've fixed the Windows build to use
ResolvedFileToPublish as the source of truth, like we do on macOS).

This is the first part of a fix for
https://github.com/xamarin/xamarin-macios/issues/17579.
2023-04-19 07:32:13 +02:00
Rolf Bjarne Kvinge d4797e605b
[xharness] Add support for tests labeled 'Windows'. (#18089)
We already have support for 'run-windows-tests' and 'skip-windows-tests'
labels: 3e86254ef8.
2023-04-19 07:24:03 +02:00
Rolf Bjarne Kvinge ecea1a431c
[msbuild] Remove the SdkVersion property in the ReadAppManifest task. (#18053)
The ReadAppManifest task doesn't need the SdkVersion, because it's only used to compute
the path to the sdk on disk, and that path can be calculated without an sdk version
now:

    $ ls -la /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
    total 0
    drwxrwxr-x  4 rolf  staff  128 Dec 14 10:58 .
    drwxr-xr-x  5 rolf  staff  160 Nov 11 01:38 ..
    drwxrwxr-x  8 rolf  staff  256 Dec 14 10:48 iPhoneOS.sdk
    lrwxr-xr-x  1 rolf  staff   12 Dec 14 10:56 iPhoneOS16.2.sdk -> iPhoneOS.sdk

In fact, the path with the version just symlinks to the path without.
2023-04-17 07:57:42 +02:00
Rolf Bjarne Kvinge e93c75c2e5
[msbuild] Simplify the CompileAppManifest a bit by removing the SdkPlatform input property. (#18054)
We don't need the SdkPlatform input, because we can compute it from
other input properties.
2023-04-17 07:50:35 +02:00
Rolf Bjarne Kvinge 03f0a35012
[CoreMidi] Create a blittable version of MidiCIDeviceIdentification. (#18052)
The original implementation for the MidiCIDeviceIdentification struct uses
public byte[] fields with a MarshalAs attribute to set the array size. This is
not blittable, but unfortunately these are _public_ fields, which means we
can't change them.

Instead introduce an internal intermediate struct, which is blittable, and
convert to and from this struct when marshalling to and from native code.

Then in XAMCORE_5_0 we can make the intermediate struct public and use it
instead of the non-blittable struct everywhere.
2023-04-17 07:49:31 +02:00
Rolf Bjarne Kvinge 0bb732072f
[tests] Ignore DNS lookup failures in CI. (#18049)
This will hopefully fix the following errors:

    [FAIL] TrustUsingNewCallback : System.Net.WebException : nodename nor servname provided, or not known (dotnet.microsoft.com:443)
     ----> System.Net.Http.HttpRequestException : nodename nor servname provided, or not known (dotnet.microsoft.com:443)
     ----> System.Net.Sockets.SocketException : nodename nor servname provided, or not known
    	   at System.Net.HttpWebRequest.GetResponse()
    	   at System.Net.WebClient.GetWebResponse(WebRequest )
    	   at System.Net.WebClient.DownloadBits(WebRequest , Stream )
    	   at System.Net.WebClient.DownloadDataInternal(Uri , WebRequest& )
    	   at System.Net.WebClient.DownloadString(Uri )
    	   at System.Net.WebClient.DownloadString(String )
    	   at LinkSdk.CryptoTest.TrustUsingNewCallback()
    	   at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
    	--HttpRequestException
    	   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String , Int32 , HttpRequestMessage , Boolean , CancellationToken )
    	   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage , Boolean , CancellationToken )
    	   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage , Boolean , CancellationToken )
    	   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem )
    	   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1[[System.Net.Http.HttpConnection, System.Net.Http, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].WaitWithCancellation(CancellationToken )
    	   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1[[System.Net.Http.HttpConnection, System.Net.Http, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].WaitWithCancellationAsync(Boolean , CancellationToken )
    	   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.<WaitForConnectionAsync>d__5[[System.Net.Http.HttpConnection, System.Net.Http, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
    	   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage , Boolean , Boolean , CancellationToken )
    	   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage , Boolean , CancellationToken )
    	   at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage , CancellationToken )
    	   at System.Net.Http.SocketsHttpHandler.Send(HttpRequestMessage , CancellationToken )
    	   at System.Net.Http.HttpMessageInvoker.Send(HttpRequestMessage , CancellationToken )
    	   at System.Net.Http.HttpClient.Send(HttpRequestMessage , HttpCompletionOption , CancellationToken )
    	   at System.Net.HttpWebRequest.SendRequest(Boolean )
    	   at System.Net.HttpWebRequest.GetResponse()
    	--SocketException
    	   at System.Net.Dns.GetHostEntryOrAddressesCore(String , Boolean , AddressFamily , Int64 )
    	   at System.Net.Dns.GetHostAddressesCore(String , AddressFamily , Int64 )
    	   at System.Net.Dns.GetHostAddresses(String , AddressFamily )
    	   at System.Net.Dns.GetHostAddresses(String )
    	   at System.Net.Sockets.Socket.Connect(String , Int32 )
    	   at System.Net.Sockets.Socket.Connect(EndPoint )
    	   at System.Net.HttpWebRequest.<>c__DisplayClass219_0.<<CreateHttpClient>b__1>d.MoveNext()
    	--- End of stack trace from previous location ---
    	   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String , Int32 , HttpRequestMessage , Boolean , CancellationToken )
2023-04-14 08:28:17 +02:00
Rolf Bjarne Kvinge b29169bccc
[bgen] Check for null (no) namespace when matching namespace to framework. Fixes #18025. (#18046)
Fixes https://github.com/xamarin/xamarin-macios/issues/18025.
2023-04-14 08:27:16 +02:00
Rolf Bjarne Kvinge f2dc429f3c [net8.0] Merge main into net8.0. 2023-04-13 08:27:25 +02:00
Rolf Bjarne Kvinge a179f83df6
[tests] Remove duplicated 'using' directives. (#18033) 2023-04-13 08:11:28 +02:00
Rolf Bjarne Kvinge 8ceb8731dd
[tests] Ignore a warning we don't care about in F# test code. (#18034) 2023-04-13 08:11:20 +02:00
dotnet-maestro[bot] a7de036e62
[net8.0] Update dependencies from dotnet/installer (#17888)
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.ILLink.Tasks**: from 8.0.0-preview.3.23171.4 to 8.0.0-preview.4.23176.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0-preview.4.23171.7 to 8.0.0-preview.4.23176.6 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-preview.3.23171.4 to 8.0.0-preview.4.23176.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**: from 8.0.0-preview.3.23167.1 to 8.0.0-preview.4.23170.1 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-preview.3.23171.4 to 8.0.0-preview.4.23176.4 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer
- **Subscription**: 9a2944cb-7dee-4bf2-a65c-08dabd10ae64
- **Build**: 20230328.2
- **Date Produced**: March 28, 2023 10:27:20 AM UTC
- **Commit**: 69e28735b98581f2ee0825953de83a8581df7563
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-preview.4.23172.3 to 8.0.100-preview.4.23178.2][21]
  - **Microsoft.NET.ILLink.Tasks**: [from 8.0.0-preview.3.23171.4 to 8.0.0-preview.4.23176.4][22]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-preview.4.23171.7 to 8.0.0-preview.4.23176.6][23]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-preview.3.23171.4 to 8.0.0-preview.4.23176.4][22]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**: [from 8.0.0-preview.3.23167.1 to 8.0.0-preview.4.23170.1][24]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-preview.3.23171.4 to 8.0.0-preview.4.23176.4][22]

[21]: 27622e3898...69e28735b9
[22]: edb161ab06...8d5f520838
[23]: 16907a1efa...c2350729d0
[24]: 25d9f7a5e3...a464820353
2023-04-12 09:38:36 +02:00
Rolf Bjarne Kvinge a54ab5c42a
[tools/tests] Fix bug in 'link all' test and the resulting regression that showed up in code. (#18016)
There's a 'link all' test that's verifying that the IntroducedAttribute is
linked away. It does so by verifying that the linked app doesn't have a
'IntroducedAttribute' type - but the test was constructing the fully qualified
type name to look for incorrectly:

    ObjCRuntime.IntroducedAttribute, , Microsoft.iOS

Note the double comma: that meant we wouldn't find the type, even if it wasn't linked away.

The fix is easy (use a single comma), with one caveat (don't use a constant
string, because the linker sees the reference to
"ObjCRuntime.IntroducedAttribute" and _helpfully_ preserves it, exactly what
we don't want), but it revealed that the tested behavior regressed: a fully
linked app wouldn't link away the IntroducedAttribute.

So a fix is also needed: properly remove TVAttribute, WatchAttribute and
MacCatalystAttribute, which are subclasses of IntroducedAttribute (and what
would make the linker keep IntroducedAttribute).

Interestingly this showed up because of a bug in the runtime, where parsing
the invalid assembly name would now throw an exception
(https://github.com/dotnet/runtime/issues/84118).
2023-04-11 20:12:35 +02:00
Rolf Bjarne Kvinge 2012ffbb75
[tests] Fix BlittablePInvokes.CheckForNonBlittablePInvokes to not verify known failures unless building for all platforms. (#18007)
This fixes a test failure when not including all platforms:

	Cecil.Tests.BlittablePInvokes.CheckForNonBlittablePInvokes: Known failures that aren't failing anymore - remove these from the list of known failures: In the file tests/cecil-tests/BlittablePInvokes.cs, read the guide carefully.
		Expected: <empty>
		But was: < "AudioUnit.AudioComponentStatus AudioUnit.AudioUnit::AudioOutputUnitPublish(AudioUnit.AudioComponentDescription,System.IntPtr,System.UInt32,System.IntPtr)", ...
2023-04-11 07:12:46 +02:00
Rolf Bjarne Kvinge 3d554c2200
[tests] Fix assumption that we'll always produce a compressed binding resource package in the ProjectTest.LibraryReferencingBindingLibrary test. (#18008)
Fixes this test failure when building only for iOS (and similar for tvOS):

	Xamarin.Tests.DotNetProjectTest.LibraryReferencingBindingLibrary(iOS): Existence
		Expected: file or directory exists
		But was: "/Users/builder/azdo/_work/4/s/xamarin-macios/tests/dotnet/LibraryReferencingBindingLibrary/iOS/bin/Debug/net7.0-ios/BindingWithDefaultCompileInclude.resources.zip"
2023-04-11 07:12:27 +02:00
Rolf Bjarne Kvinge 059aa7ad8f [net8.0] Merge main into net8.0. 2023-04-10 12:44:17 +02:00
Rolf Bjarne Kvinge 8c9ee8289f
[msbuild/dotnet] Rework how we collect and process native references. (#17554)
Previously, we'd do this:

* Collect all possible native references.
* Extract any compressed native references (*.framework.zip, *.xcframework.zip,
  *.resources.zip) to disk.
* Resolve the resulting native references.

This doesn't work very well on Windows (in non-connected/Hot Restart mode),
because some compressed files may contain symlinks (in particular compressed
xcframeworks). If those symlinks are for any other platform than the one we're
building for, they shouldn't matter, but if we extract the entire compressed
xcframework before figuring out what we need from it, we'd run into symlinks
and not knowing whether they should be ignored or not.

So rework the process to:

* Collect all possible native references.
* Resolve the resulting native references, peeking into zip files if need be.
* Extract any compressed native references, but only the parts of the zip we need.

This way we won't run into any symlinks unless we really need them, and it
should also improve build performance slightly, even on macOS, since we're not
extracting files we won't need (which can be significant for xcframeworks).

Additionally:

* Add support for unzipping on Windows by using System.IO.Compression.
* Show an error if attempting to extract a symlink in the last step in the
  reworked process on Windows.
* Some tests had to be updated (since they poked into internals of the
  ResolveNativeReferences task, and those internals have changed).
2023-04-10 11:27:41 +02:00
Alex Soto db0b1ff52f Merge remote-tracking branch 'xamarin/main' into net8.0-main-merge 2023-04-05 15:25:09 -04:00
Rolf Bjarne Kvinge 2aff5aefe6
[tests] Add missing file to .NET tests. (#17947)
This fixes an issue in the BundleStructure tests:

> error MSB3030: Could not copy the file
"/Users/builder/azdo/_work/4/s/xamarin-macios/tests/dotnet/BundleStructure/NoneP.dll"
because it was not found.
2023-03-30 18:49:05 +02:00
Rolf Bjarne Kvinge 62ee7a4426
[msbuild] Move *.targets, *.props and FrameworkList.xml files to a common directory. (#17860)
This unifies the code/logic between iOS and macOS a bit more.
2023-03-30 18:25:14 +02:00
Alex Soto bae2dd5f78
[main] Add Xcode 14.3 Support (#17810)
please do review the work done so far, this should be up to date to
Xcode 14.3 Beta 2. Best way to review this is going commit by commit
2023-03-30 12:10:45 -04:00
Rolf Bjarne Kvinge 335f8c9d90
[dotnet/msbuild] Don't bundle *.xml files that match any assemblies. Fixes #14939 and fixes #15897. (#17908)
This fixes a warning when documentation is enabled for a project:

> The file '~/.nuget/packages/fsharp.core/6.0.0/contentFiles/any/netstandard2.1/FSharp.Core.xml' does not specify a 'PublishFolderType' metadata, and a default value could not be calculated. The file will not be copied to the app bundle.

This doesn't change any behavior (as the warning says, the file wasn't copied
to the app bundle before either), but it makes the behavior explicitly
documented and silences the warning.

Fixes https://github.com/xamarin/xamarin-macios/issues/14939.
Fixes https://github.com/xamarin/xamarin-macios/issues/15897.
2023-03-30 07:24:00 +02:00
Alex Soto 4d98f09877 [tests] Add two more know issues to the BlittablePInvokes.CheckForNonBlittablePInvoke 2023-03-29 22:25:30 -04:00
Rolf Bjarne Kvinge b24323fc0a [tests] Update BuildWithObjcArcFlag test to cope with breaking changes in Xcode 14.3. 2023-03-29 14:37:51 -04:00
Alex Soto f793719e58 [xcode14.3] Update bidnings to Xcode 14.3 RC and fix tests 2023-03-29 14:37:51 -04:00
Rolf Bjarne Kvinge 65137612a4 [tests] Add more accepted public symbols to the Xamarin.Tests.Misc.VerifySymbols test. 2023-03-29 14:37:51 -04:00
Alex Soto 658346262d Apply suggestions from code review
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-03-29 14:37:51 -04:00
Alex Soto 67ee103d30 [WebKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 014eb10674 [VideoSubscriberAccount] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 3936403fd3 [UIKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto cdf9be3038 [ThreadNetwork] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto db24230b67 [SensorKit] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto c0169509ba [PencilKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto dd8007b98a [PassKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 81034eb003 [NetworkExtension] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto c525187e3d [MediaAccessibility] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto d824a93b9a [JavaScriptCore] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto f21f9a63a5 [Intents] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 4eda3948ca [HomeKit] [ImageIO] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 542f8cd07e [HealthKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 6c36c1abe9 [GameKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 6a21f91f16 [Foundation] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 9f03095fd7 [FileProvider] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 6f9113f54f [CoreWLAN] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 283c2dc643 [CoreML] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 7bb36f88aa [CoreLocation] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 968c73eee8 [CoreFoundation] Cleanup xtro as nothing to be done here 2023-03-29 14:37:51 -04:00
Alex Soto c3daeaf510 [CarPlay] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 80dcea3188 [BackgroundAssets] Update bindings to Xcode 13.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 85b2e8c93d [AVRouting] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 8b6f1c64e4 [AppKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 3aad6f054d [authenticationservices] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 46eaabc17d [xcode14.3] Update bindings to Xcode 14.3 2023-03-29 14:37:51 -04:00
Rolf Bjarne Kvinge 8deec35a20
[net8.0] Remove support for .NET 6. (#17901)
Context: https://dotnet.microsoft.com/platform/support/policy/maui

> A major version of .NET MAUI receives support for a minimum of 6
> months after a successor (the next major release) ships. For
> example, .NET MAUI 6.0 will be supported for 6 months after .NET
> MAUI 7.0 ships. Similarly, .NET MAUI 7.0 will receive support for 6
> months after .NET MAUI 8.0 ships.

By the time .NET 8 GA ships, .NET 6 MAUI projects will not be supported.

Remove .NET 6 support from our .NET 8 workloads.
2023-03-29 10:25:25 +02:00
Rolf Bjarne Kvinge 58c6724c71 [net8.0] Merge main into net8.0. 2023-03-28 15:23:06 +02:00
Rolf Bjarne Kvinge d5ad7db296
[tests] Improve the Blittable P/Invoke test to report signatures with MarshalAs attributes. (#17879)
Also augment the test to use existing helper methods to compare actual
failures with known failures.
2023-03-28 12:44:55 +02:00
Rolf Bjarne Kvinge 226a5f198f Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2023-03-14 2023-03-27 19:53:33 +02:00
Manuel de la Pena cc695a8196
[Generator] Clean the attribute work. (#17570)
Some changes:

1. Move all the static attr related methods to the attr factory.
2. Make it simpler to see the diff between NET and not by using a
partial class.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-03-23 16:54:08 -04:00
Haritha Mohan 3dff232920
[dotnet] Enable generation of runtime configuration file (#17840)
Set the GenerateRuntimeConfigurationFiles (GRCF) property to true 
to avoid warnings at build time + add test for change.

Diving deeper into the fix...
- This warning only occurs with .NET apps which is why GRCF
is only updated in the dotnet directory and not msbuild (legacy)
- After examining the binlog (see issue), it was found that the GRCF 
was contingent upon the HasRuntimeOutput property, which is only 
defined for executable projects. And in this case, the user's project
output type is library thus both the RuntimeOutput and consequently 
GRCF properties were not enabled.
- By setting the GRCF to true we can address the original warning of 
concern while ensuring the rest of the projects's behavior is not
altered
in mysterious ways (i.e. by touching the RuntimeOutput property or the 
project output type instead, these changes could have extraneous
effects).

Fixes #17543

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-03-23 08:10:04 -07:00
Rolf Bjarne Kvinge cfa2734a3a Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2023-03-14 2023-03-23 15:33:43 +01:00
Rolf Bjarne Kvinge 4131267879 Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2023-03-14 2023-03-23 08:36:21 +01:00
Rolf Bjarne Kvinge 6e2ff59b30
[tests] Port Cecil tests to a .NET test project. (#17836) 2023-03-23 08:34:52 +01:00
Rolf Bjarne Kvinge 07198f1224
[tests] Add Windows .NET test that exercises some of our test configuration code. (#17874) 2023-03-22 20:23:26 +01:00
Rolf Bjarne Kvinge 999c5a3e97
[tests] Share code to verify failures. (#17872)
We have some code that verifies a list of failures against a known set of
failures and:

* Fails if any known failure is fixed.
* Fails if there any new (unknown) failures.

Create a helper method that contains this logic, since it's duplicated quite a
few times across various tests.
2023-03-22 11:47:54 +01:00
Rolf Bjarne Kvinge 7ea0044224
[dotnet/msbuild] Copy binding resource packages to output directories together with CopyLocal assemblies. Fixes #13910. (#17806)
With a project structure like this:

* Executable project references a library project.
* The library project references a binding project (or assembly).

The binding project's assembly will be copied to the library project's
output directory during the build. Unless we also make sure any binding
resource packages are copied as well, the executable project won't find those,
and the final app won't contain any native bits from the binding project.

The solution is to add any binding resource packages to the list of
files to be copied to the library's output directory.

Fixes https://github.com/xamarin/xamarin-macios/issues/13910.
2023-03-22 10:49:26 +01:00
Rolf Bjarne Kvinge e86c77a773
[devops] Run .NET tests with the 'Windows' category on Windows (#17796) 2023-03-22 07:49:03 +01:00
Rolf Bjarne Kvinge 6300a6aff7
[tests] Improve NWProtocolIPOptionsTest to not leak exceptions on background threads. (#17824) 2023-03-21 16:16:25 +01:00
Steve Hawley 63470f9b74
add EditorBrowsable to obsolete member (#17854) 2023-03-21 07:41:39 +01:00
Rolf Bjarne Kvinge 38a2442839
[tests] Run the OutOverriddenWithoutOutAttribute test on all platforms on .NET (#17827) 2023-03-17 07:57:59 +01:00
Steve Hawley 61ad2a9dec
CGEventCreate fixed broken call, added tests (#17805)
Fixes https://github.com/xamarin/xamarin-macios/issues/17656
2023-03-16 11:00:12 -04:00
Rolf Bjarne Kvinge d970fa94a3 Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2023-03-14 2023-03-15 16:04:21 +01:00
Rolf Bjarne Kvinge c398f333fc
[monotouch-test] Be more accepting in the NSTextInputClient test. (#17795)
It seems we can get different results depending on OS versions, but I had no
success figuring out the conditions that make the results differ, so just
accept all variations we get.
2023-03-15 14:33:44 +01:00
Rolf Bjarne Kvinge 0faf60c2e9
[tests] Add new cecil tests to verify correct block literal usage in our own code. Fixes #15783. (#17794)
This is the final step in our improved block support.

Fixes https://github.com/xamarin/xamarin-macios/issues/15783.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2023-03-15 14:31:02 +01:00
Rolf Bjarne Kvinge c391695bb1
[AppKit] Add a weakly typed version of NSRulerView.WeakMeasurementUnits. Fixes #17742. (#17779)
There's not a finite list if measurement units, apps can create their own, so
we have to allow weakly typed measurement units (the normal property is bound
using a strong enum to NSRulerViewUnits).

Fixes https://github.com/xamarin/xamarin-macios/issues/17742.
2023-03-15 10:47:11 +01:00
Rolf Bjarne Kvinge 6e10fd5d27 [net8.0] Merge main into net8.0. 2023-03-14 10:12:55 +01:00
Rolf Bjarne Kvinge 29633a6231
[generator] Make the block callbacks UnmanagedCallersOnly functions in .NET. (#17741)
This also required updating a manual binding since it poked into
generated internals.

Contributes towards https://github.com/xamarin/xamarin-macios/issues/15783.
2023-03-14 10:08:28 +01:00
Alex Soto 91781715a9
[CI] [siminstaller] Bump bots to use the Ventura and make siminstaller more resilient (#17760)
## siminstaller

We are getting a `System.IO.IOException: Resource busy`
when trying to detach with hdiutil on Ventura. When reaching
this spot we are really done with the mounted resource so
let's force detaching and in the event that it fails let's
just log since at this point the simulator is installed.

## CI

Bump bots to use the Ventura images, and Add `macOSName`
parameter to our yaml templates.

`macOSName` maps to the `macOS.Name` capability in our bots, this
way we can set the macOS name we want to use on the bots in bot build and tests.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-03-14 07:27:00 +01:00
Rolf Bjarne Kvinge 69f5c42db4 [net8.0] Merge main into net8.0. 2023-03-08 23:48:50 +01:00
Steve Hawley 4c1e5681f1
[dotnet] future proof the test (#17739)
Add documentation in case of future test fails
2023-03-08 12:29:57 -05:00
Rolf Bjarne Kvinge d6d02fa05a
[monotouch-test] Fix bool encoding in tests on ARM64 on Mac Catalyst. (#17695)
Fixes:

    [FAIL] TestTypeEncodings :   #14
        String lengths are both 1. Strings differ at index 0.
        Expected: "B"
        But was:  "c"
        -----------^
2023-03-08 10:43:52 +01:00
Rolf Bjarne Kvinge d1804f5e68
[tests] Use Path.Combine instead of hardcoding '/'. (#17733) 2023-03-08 10:43:24 +01:00
Rolf Bjarne Kvinge 07afcf9e97 [net8.0] Merge main into net8.0. 2023-03-07 18:12:02 +01:00
Rolf Bjarne Kvinge a4ae14870f
[generator] Generate block callback signatures using only blittable types. (#17712)
Change the generated block callbacks so that we only use blittable types
(so that the callbacks can become [UnmanagedCallersOnly]).

This involved two changes:

* Use pointer types instead of ref/out types ('int*' instead of 'ref/out int').
* Use 'byte' instead of 'bool'.

Contributes towards https://github.com/xamarin/xamarin-macios/issues/15783.
2023-03-07 17:38:36 +01:00
Rolf Bjarne Kvinge 63e6d9b4e8
[src] Commit some of the response files. (#17718)
We'll soon build and run tests on Windows, and some tests use these response files,
so it makes building these tests on Windows easier if we don't have to re-create
the response files (our generation logic is all written in make, which is not the
easiest on Windows).
2023-03-07 17:32:27 +01:00
Steve Hawley dec6ce3445
[dotnet] final blittable pinvoke (#17723)
test passes now.
2023-03-07 10:16:11 -05:00
Rolf Bjarne Kvinge be031736be
[net8.0] [tests] Add a .NET 7 test app. (#17385) 2023-03-07 07:58:54 +01:00
Rolf Bjarne Kvinge a39cefa457
[msbuild] Fix nullability issue when compiling for legacy Xamarin. (#17716)
And make sure we don't ignore any such warnings again for a few test projects.
2023-03-07 07:54:21 +01:00
Rolf Bjarne Kvinge 666bd9ae9e
[tests] Fix NSTextInputClient tests on macOS Ventura. (#17713)
Fixes:

    apitest.NSTextInputClient
        [FAIL] NSTextInputClient_ShouldGetBaselineDelta :   NSTextInputClient_ShouldGetBaselineDelta - Returned wrong baseline delta value
            Expected: True
            But was:  False
              at apitest.NSTextInputClient.NSTextInputClient_ShouldGetBaselineDelta () [0x0000e] in /Users/builder/azdo/_work/3/s/xamarin-macios/tests/monotouch-test/AppKit/NSTextInputClient.cs:108
        [FAIL] NSTextInputClient_ShouldGetFirstRect :   NSTextInputClient_ShouldGetFirstRect - Returned wrong rect
            Expected: {X=0,Y=0,Width=12,Height=14}
            But was:  {X=0,Y=0,Width=0,Height=14}
              at apitest.NSTextInputClient.NSTextInputClient_ShouldGetFirstRect () [0x00030] in /Users/builder/azdo/_work/3/s/xamarin-macios/tests/monotouch-test/AppKit/NSTextInputClient.cs:84
2023-03-07 07:47:39 +01:00
dotnet-maestro[bot] 727a29d8c9
[net8.0] Update dependencies from dotnet/installer (#17518)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: 9a2944cb-7dee-4bf2-a65c-08dabd10ae64
- **Build**: 20230306.1
- **Date Produced**: March 6, 2023 10:15:46 AM UTC
- **Commit**: 51e06f6931e859f56564556fa6ba519761fa7141
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-preview.2.23108.2 to 8.0.100-preview.3.23156.1][77]
  - **Microsoft.NET.ILLink.Tasks**: [from 8.0.0-preview.2.23107.1 to 8.0.0-preview.2.23127.4][78]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-preview.2.23107.2 to 8.0.0-preview.3.23127.13][79]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-preview.2.23107.1 to 8.0.0-preview.2.23127.4][78]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-preview.2**: [from 8.0.0-preview.2.23081.3 to 8.0.0-preview.2.23113.1][80]

[77]: 5a84050...51e06f6
[78]: e71a4fb...2bdc3cb
[79]: cec7fbf...3265dc6
[80]: 1d9df33...d7ff0aa

## 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.ILLink.Tasks**: from 8.0.0-preview.2.23107.1 to 8.0.0-preview.2.23127.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0-preview.2.23107.2 to 8.0.0-preview.3.23127.13 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-preview.2.23107.1 to 8.0.0-preview.2.23127.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-preview.2**: from 8.0.0-preview.2.23081.3 to 8.0.0-preview.2.23113.1 (parent: Microsoft.NETCore.App.Ref)
2023-03-07 07:11:52 +01:00
Steve Hawley d87d0cddef
[dotnet] Darwin p/invokes (#17698) 2023-03-06 10:25:41 -05:00
Rolf Bjarne Kvinge fb3df91407
[tests] Adjust EveryFrameworkSmokeTest to not run when every assembly is linked. (#17696)
It expects the executable to be linked will every system framework we've
bound, which doesn't happen when linker is enabled for all assemblies.
2023-03-06 13:38:07 +01:00
Rolf Bjarne Kvinge 3f742de4aa
[monotouch-test] Fix NWBrowserTest to not throw assertions on background threads. (#17697)
Exceptions on background threads will crash the process.
2023-03-06 12:48:39 +01:00
Rolf Bjarne Kvinge 0c4be6ec9c Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2023-03-03 2023-03-03 13:20:17 +01:00
Rolf Bjarne Kvinge 8355cc0600
[tests] Don't use 'notdir' to compute the filename of a path. (#17682)
It doesn't work at all with paths with spaces. Instead call into the shell to
compute the filename.

Also fix a couple of other quoting issues.
2023-03-03 11:10:37 +01:00
Rolf Bjarne Kvinge 7a866a5cc6 [net8.0] Merge main into net8.0. 2023-03-02 15:49:52 +01:00
Rolf Bjarne Kvinge d75b697ebc
[tests] Adjust UrlSessionTests to ignore more failure scenarios in CI. (#17649)
Should fix random test failures like this:

    MonoTouchFixtures.Foundation.UrlSessionTest
        [FAIL] CreateDataTaskAsync :   CreateDataTask a Exception
            Expected: null
            But was:  <Foundation.NSErrorException: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=57, NSUnderlyingError=0x6000011f4990 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x600003deaa80 [0x7ff865b1f1c0]>{length = 16, capacity = 16, bytes = 0x100201bb6007a9b70000000000000000}, _kCFStreamErrorCodeKey=57, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <5E766082-B379-491A-BCB0-EA1B36E54A8B>.<15>, _NSURLErrorRelatedURLSessionTaskErrorKey=("LocalDataTask <5E766082-B379-491A-BCB0-EA1B36E54A8B>.<15>"), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://www.microsoft.com/, NSErrorFailingURLKey=https://www.microsoft.com/, _kCFStreamErrorDomainKey=1}
                at MonoTouchFixtures.Foundation.UrlSessionTest+<>c__DisplayClass1_0.<CreateDataTaskAsync>b__0 () [0x00039] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Foundation/UrlSessionTest.cs:64 >
                at MonoTouchFixtures.Foundation.UrlSessionTest.CreateDataTaskAsync () [0x000b7] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Foundation/UrlSessionTest.cs:71
2023-03-02 10:38:41 +01:00
Rolf Bjarne Kvinge 8285c08c17
[registrar] Improve support for pointers to value types in exported signatures. (#17608)
This will be required when we make blocks use blittable callbacks, since we'll
have to use pointers in a few cases (because ref/out arguments aren't
blittable).
2023-02-28 11:48:27 +01:00
Rolf Bjarne Kvinge a867353096 [net8.0] Merge main into net8.0. 2023-02-28 08:00:23 +01:00
Steve Hawley aacedd12c7
[dotnet] Remove dead method, add some ignores (#17631)
Removed a flavor of `class_addMethod` that is unused.
Ignored a few cases that are going to be in .NET and/or may break AOT
optimizations

Now all iOS pivots pass, 17 macOS remain.
2023-02-27 17:56:06 -05:00
Steve Hawley 32961d97dd
[dotnet] UIMain changes (#17611)
handling of string array for args
2023-02-27 10:23:39 -05:00
Rolf Bjarne Kvinge aaa79e85ed
[tests] Improve diagnostic output in FSEventStreamTest. (#17614)
Ref: https://github.com/xamarin/maccore/issues/2630
2023-02-27 14:14:05 +01:00
Steve Hawley 1ca9a8fbdf
[dotnet] CGImageMetadata (#17530)
Fixed pinvoke used for CGIMetadata.EnumerateTags
2023-02-23 10:50:58 -05:00
Rolf Bjarne Kvinge c8ca8f401f
[monotouch-test] Fix AUParameterNodeTest to not crash the process in case of asserts on background threads. (#17593) 2023-02-23 14:34:50 +01:00
Rolf Bjarne Kvinge f8f5124a88
[generator] Fix fetching nullability for block properties by checking the property for nullability info. (#17594) 2023-02-23 14:34:20 +01:00
Rolf Bjarne Kvinge fec1e8a946 [net8.0] Merge main into net8.0. 2023-02-22 07:05:49 +01:00
Rolf Bjarne Kvinge ad4af52393
[dotnet] Improve error message when someone tries to disable trimming by setting PublishTrimmed=false. (#17568)
Make it more actionable, by telling users what they can do instead.
2023-02-21 14:54:44 +01:00
Manuel de la Pena b462bfde99
[Generator] Move naming logic to its own class and add tests. (#17562)
Naming could be problematic when generating code, move the logic out of
the generator class to a helper class whose only job is to name classes
and keep track of names.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-17 15:33:53 -05:00
Rolf Bjarne Kvinge 7e05ea54bb Merge main into net8.0. 2023-02-17 14:58:12 +01:00
Manuel de la Pena 28db48f6ee
[Generator] Refactor method that was forgotten as an extension one. (#17550)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-16 08:48:09 -05:00
Manuel de la Pena c744a8bbc7
[Generator] Refactor AsyncMethodInfo, set nullability and add collection extensions. (#17538)
Several changes:

- Refactored AsyncMethodInfo and move the collection extensions out of
the Generator class.
- Added tests for the collection extension methods.
- Fix a mistake/bug in which Last was used instead of LastOrDefault
(funny comment was close to the right reason).

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-16 08:47:28 -05:00
Manuel de la Pena be1bee04b4
[Generator] Refactor more string extensions. (#17532)
Move all the string methods that can be an extension to a static class
(re-use the present one) and add tests.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2023-02-16 08:45:43 -05:00
Manuel de la Pena b0683b90d5
[Generator] Move PlatformName maps out of the generator and add tests. (#17539)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-15 12:12:13 -05:00
Manuel de la Pena 498ced1811
[Generator] Remove method that is already present in the reflection API. (#17524)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-13 19:17:38 -05:00
dustin-wojciechowski 3eeb7691dc
Add ventura to mac tests configurations (#17349)
Added Ventura machines to macTestConfigurations within both the
build-ci-pipeline and the build-pr-pipelines.

---------

Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-02-13 11:08:18 -05:00
dotnet-maestro[bot] 6eb501be2b
[net8.0] Update dependencies from dotnet/installer (#17444)
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.ILLink.Tasks**: from 8.0.100-1.23067.1 to 8.0.0-preview.2.23101.2 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0-alpha.1.23076.8 to 8.0.0-preview.2.23101.7 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100**: from 8.0.0-alpha.1.23073.2 to 8.0.0-alpha.1.23066.1 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-alpha.1.23076.9 to 8.0.0-preview.2.23101.2 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer
- **Subscription**: 9a2944cb-7dee-4bf2-a65c-08dabd10ae64
- **Build**: 20230202.11
- **Date Produced**: February 2, 2023 10:28:14 PM UTC
- **Commit**: 5c7737d740c861fe7cda4822a7137c22368000dc
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-alpha.1.23077.6 to 8.0.100-preview.2.23102.11][1]
  - **Microsoft.NET.ILLink.Tasks**: [from 8.0.100-1.23067.1 to 8.0.0-preview.2.23101.2][2]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-alpha.1.23076.8 to 8.0.0-preview.2.23101.7][3]
  - **Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100**: [from 8.0.0-alpha.1.23073.2 to 8.0.0-alpha.1.23066.1][4]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-alpha.1.23076.9 to 8.0.0-preview.2.23101.2][5]

[1]: 1d88a6b...5c7737d
[2]: c790896...842ec4a
[3]: 4d75ee9...56cb24c
[4]: ff23620...5b46122
[5]: 007df05...842ec4a
2023-02-13 07:34:42 +01:00
Steve Hawley 309dbe3be0
[DotNet] CoreFoundation Pinvokes (#17505)
Updates the pinvokes in CoreFoundation to have blittable types.
I intentionally did *not* do `CFReadStream` and `CFWriteStream` as the
changes needed for those are may create a breaking API change, so those
should probably be their own PR for closer scrutiny.

Please look closely at CFProxySupport as that was the least
straightforward of the changes.
2023-02-10 19:06:29 -05:00
Rolf Bjarne Kvinge 8e4f22d20e
[msbuild] Add DT* entries to the Info.plist for all platforms. Fixes #13300. (#17499)
Modify the code to add Xcode (DT*) variables to the Info.plist:

* Do it for all platforms, not only mobile platforms. Apple uses these fields to
  determine if an app was built with a prerelease or old version of Xcode, and will
  reject any app submissions if this validation fails.

* Change the behavior to do not distinguish simulator builds, a bit of testing
  in Xcode shows that Xcode always adds these values to the Info.plist, even for
  simulator builds. This is probably something that changed in Xcode a *long* time
  ago, since this code is old (from the initial import of the build logic from MonoDevelop
  around 10 years ago).

* Also bump Xamarin.MacDev to get a related fix:

  New commits in xamarin/Xamarin.MacDev:

  * xamarin/Xamarin.MacDev@74c95ee [Xamarin.MacDev] Always fetch the DTSDKBuild variable.

  Diff: 14d53612d4..74c95ee1c3

Fixes https://github.com/xamarin/xamarin-macios/issues/13300.
2023-02-10 22:58:38 +01:00
Steve Hawley 1a9e9be626
[dotnet] address book pinvokes (#17419) 2023-02-08 12:02:06 -05:00
Rolf Bjarne Kvinge 4d76ab9968 Merge main into net8.0. 2023-02-07 16:29:24 +01:00
Rolf Bjarne Kvinge afb6505f8c
[tests] Bump Microsoft.NET.Test.Sdk version to latest stable. (#17462)
The older version of Microsoft.NET.Test.Sdk depends on an older version of
Newtonsoft.Json, which triggers automated security warnings.

Ref: https://devdiv.visualstudio.com/DevDiv/_componentGovernance/113130/alert/7090885?typeId=12169115
2023-02-07 14:52:45 +01:00
Rolf Bjarne Kvinge fd44670214
[ObjCRuntime] Make sure to call 'Release' in all code paths in Runtime.GetINativeObject<T> when owns=true. Fixes #12732. (#17118)
Fixes https://github.com/xamarin/xamarin-macios/issues/12732.
2023-02-07 07:22:35 +01:00
Rolf Bjarne Kvinge 13f51fb583
[tests] Add another failure scenario to random network test failures in CI. (#17439) 2023-02-07 07:22:09 +01:00
Rolf Bjarne Kvinge 9f55faeee0 Merge remote-tracking branch 'origin/net8.0' into bump-main-in-net8.0-2023-02-06 2023-02-07 07:18:23 +01:00
Rolf Bjarne Kvinge 61dd7b188b Merge main into net8.0. 2023-02-06 08:49:13 +01:00
Rolf Bjarne Kvinge 367f0a5c13
[src] Fix a few inconsistencies in obsolete attributes. (#17447)
* Add obsolete attributes for all platforms.
* Make sure the same obsolete message is used on all platforms.
* Fix a few typos.

There are many more APIs to fix (as evidenced by the fact that this only
removes a few known failures), but this is how far I've gotten right now.
2023-02-06 08:49:00 +01:00
Haritha Mohan c814120173
[ImageCaptureCore] Add missing binding (#17424)
Deprecated "cameraDevice:didReceiveThumbnailForItem:" for macOS and
macCatalyst platforms and added updated binding for
"cameraDevice:didReceiveThumbnail:forItem:error:" method.

Refs:
[Deprecated
method](https://developer.apple.com/documentation/imagecapturecore/iccameradevicedelegate/1507941-cameradevice?changes=la_5&language=objc)
[Updated
method](https://developer.apple.com/documentation/imagecapturecore/iccameradevicedelegate/3142895-cameradevice?changes=la_5&language=objc)
2023-02-03 17:46:05 -08:00
Rolf Bjarne Kvinge 6d36bf1c1b
[cecil-tests] Add more availability attribute checks. (#17430)
Also fix a few issues:

* Fix an issue with replicating availability attributes with a third digit.

  The third version number is 'Build', not 'Revision' (which is fourth), so
  adjust our code accordingly.

  This fixes an issue where the copy of 'macos10.15.4' would become
  'macos10.15' and we'd lose the third number.

* Fix an issue when generating filter code. We were using the wrong type as
  the target (inlined) type, resulting in the wrong availability attributes
  getting created sometimes.
2023-02-03 16:44:01 +01:00
Andoni Morales Alastruey 97ab14801f
[dotnet] Add support for .so files (#16887)
Autotools-based project using libtool's -module flag generate plugins
with the .so extension that needs to be treated like DynamicLibraries in
terms of deployment location and relocation, except they are not linked
to the app.

This PR adds support for such .so files: they're treated as .dylib files, except
that they're not linked to the app.
2023-02-03 09:16:40 +01:00
Rolf Bjarne Kvinge 11a915e102 [tests] Update generator tests. 2023-02-03 09:10:47 +01:00
Rolf Bjarne Kvinge 7f52b11753 [cecil-tests] Remove a known failure that's been fixed now. 2023-02-03 09:10:47 +01:00
Rolf Bjarne Kvinge cf5d0469a6 [tests] Update MSBuild tests after bumping min OS version. 2023-02-02 16:30:30 +01:00
Rolf Bjarne Kvinge b34f5ac088 [tests] Adjust an MMP test to handle a fixed warning now that we're building for a higher min OS version. 2023-02-02 16:30:30 +01:00
Rolf Bjarne Kvinge 9c8db7e95b [tests] Update test verifying min OS versions of our native code. 2023-02-02 16:30:30 +01:00
Rolf Bjarne Kvinge ca930e3001 [tools/tests] Remove the Compat option for the MonoNative library.
No OS version we currently support require the Compat option, so just remove
it.
2023-02-02 16:30:29 +01:00
Rolf Bjarne Kvinge c54f623141 [tests] Remove 32-bit architectures and logic from project files.
Additionally remove a lot of 64-bit-specific configurations
(Debug64/Release64) as well, and just make the default configurations
(Debug/Release) be 64-bit.
2023-02-02 16:30:29 +01:00
Rolf Bjarne Kvinge 94a3903df7 [tests] Bump min OS versions in all tests. 2023-02-02 16:30:28 +01:00