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

5649 Коммитов

Автор SHA1 Сообщение Дата
Haritha Mohan a2b23186cc
[UIKit] Add Preferred Content Size Wrapper (#15800)
Fixes xamarin/xamarin-macios#15687
Added type safe wrapper for ContentSizeCategory

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2022-08-31 13:05:51 -07:00
Rolf Bjarne Kvinge c4a34b4451
[tests] Allow setting CONFIG to specify the Configuration to build. (#15793)
Allow setting CONFIG to specify the Configuration to build when building .NET
test apps from the command line.
2022-08-30 09:29:52 +02:00
Rolf Bjarne Kvinge 5e8d70f95e
[tests] Improve detection of bad CI networks. (#15516) 2022-08-29 15:42:40 +02:00
Rolf Bjarne Kvinge 5ca5a963bc
[tests] Improve handling timed out macOS tests. (#15747) 2022-08-29 12:06:25 +02:00
Rolf Bjarne Kvinge b9a60c4d7e
[msbuild] Remove the Xamarin.*.Task.Core assemblies. (#15768)
We used to do the following:

1. Have abstract task classes in the Xamarin.*.Task.Core assembly (with all
   the actual code for the task in question to work properly on macOS).
2. Subclassed task in the Xamarin.*.Task assembly, which did nothing.
3. On Windows we'd inject a different Xamarin.*.Task assembly, with
   Windows-specific overrides for the implementation in the abstract base
   class.

However, we no longer do point 3, which means that we no longer need to split
our tasks across two assemblies.

This means that we can remove the Xamarin.\*.Task.Core assemblies, and move all
the code into the corresponding Xamarin.\*.Task assembly instead.

This simplifies our code and speeds up the build.

There are more simplifications that can be done; those will come in later PRs.
2022-08-29 11:59:28 +02:00
Rolf Bjarne Kvinge a7690ee03b
[tests] Add global imports to the .NET unit tests to simplify code. (#15770) 2022-08-26 13:40:12 +02:00
Rolf Bjarne Kvinge 408cd7ac52
[msbuild] Automatically detect any Entitlements.plist files in the root project in .NET. (#15729)
Also provide a way out by setting EnableDefaultCodesignEntitlements=false.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1595888.
2022-08-26 08:06:48 +02:00
Rolf Bjarne Kvinge 454e19b957
[tests] Ignore any NuGet failures in PackageReferenceTests.SatellitesFromNuget. Fixes #xamarin/maccore@2612. (#15763)
NuGet seems to struggle with the network on the bots for this particular test,
so ignore the test if there are any nuget failures.

Fixes https://github.com/xamarin/maccore/issues/2612.
2022-08-25 16:46:08 +02:00
Rolf Bjarne Kvinge e372914ce0
[tests] Adjust MonoTouchFixtures.SceneKit.Invert to cope with tiny expected differences. (#15750)
This seems to happen on macOS 10.15 only for some reason.
2022-08-25 16:24:30 +02:00
Rolf Bjarne Kvinge afeebed06b
Bump xharness. (#15738)
Bump xharness to get fix for determining whether a test has started or not:
1809c14bb7
2022-08-24 19:12:36 +02:00
dotnet-maestro[bot] 33172248c6
[main] Update dependencies from dotnet/runtime (#15586)
* Update dependencies from https://github.com/dotnet/runtime build 20220727.6

Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.8

* Update dependencies from https://github.com/dotnet/runtime build 20220727.6

Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.8

* Update dependencies from https://github.com/dotnet/runtime build 20220813.7

Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.9

Dependency coherency updates

Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
 From Version 6.0.4 -> To Version 6.0.8 (parent: Microsoft.NETCore.App.Ref

* Update dependencies from https://github.com/dotnet/runtime build 20220815.11

Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.9

Dependency coherency updates

Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
 From Version 6.0.4 -> To Version 6.0.9 (parent: Microsoft.NETCore.App.Ref

* Update dependencies from https://github.com/dotnet/runtime build 20220816.8

Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.9

Dependency coherency updates

Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
 From Version 6.0.4 -> To Version 6.0.9 (parent: Microsoft.NETCore.App.Ref

* Update dependencies from https://github.com/dotnet/runtime build 20220819.3

Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.9

Dependency coherency updates

Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
 From Version 6.0.4 -> To Version 6.0.9 (parent: Microsoft.NETCore.App.Ref

* [tests] Adjust InvalidRuntimeIdentifier_Restore to expect failure for Mac Catalyst.

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-08-23 15:03:30 +02:00
Marius Ungureanu 4b86732da5
Nullability annotations on NSUrl (#15356)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-08-19 14:56:55 +02:00
Rolf Bjarne Kvinge 6f2a34c1d7
[tests] Improve output when writing log events in test logs. (#15688) 2022-08-18 17:25:10 +02:00
Rolf Bjarne Kvinge e54019a336
[dotnet] Make it possible to specify the registrar using a 'Registrar' property in MSBuild. (#15483)
Co-authored-by: Marius Ungureanu <therzok@gmail.com>
2022-08-18 17:21:48 +02:00
Rolf Bjarne Kvinge e18fe5a015
[tests] Don't include ErrorHelper.cs nor error.cs in Xamarin.MacDev.Tasks.Tests. (#15518)
Fixes these compiler warnings:

    xamarin-macios/src/ObjCRuntime/ErrorHelper.cs(22,17): warning CS0436: The type 'ProductException' in 'xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/../../../tools/common/error.cs' conflicts with the imported type 'ProductException' in 'Xamarin.iOS.Tasks, Version=15.11.0.465, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. Using the type defined in 'xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/../../../tools/common/error.cs'. [xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj]
    xamarin-macios/tools/common/error.cs(10,34): warning CS0436: The type 'ErrorHelper' in 'xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/../../common/ErrorHelper.tests.cs' conflicts with the imported type 'ErrorHelper' in 'Xamarin.iOS.Tasks, Version=15.11.0.465, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. Using the type defined in 'xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/../../common/ErrorHelper.tests.cs'. [xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj]
2022-07-26 11:42:44 -04:00
TJ Lambert 481e3ec53a
[Fix] Reorder the enum to the correct order (#15540)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-07-26 11:40:12 -04:00
Manuel de la Pena 0a1437aac1
[Xtro] Ensure that when we do auto sanitize we do not return a fail. (#15551)
When working on the bindings we can use the "AUTO_SANITIZE" env var to
let xtro know that we want the lines that have been fixed to be removed,
unfortunatly this mode has a bug. When we autosanitized we should do the
same as the skip and not return the lines that have been cleaned as the
return code.

Returning the error code meant that when we did make all, the
first target (classic) would work, but the second target would not
because the first one failed.

Doing this allows to work on the bindings and have AUTO_SANITIZE work
both for classic and dotnet when doing make all.
2022-07-20 08:26:01 -04:00
Rolf Bjarne Kvinge 16f14a965e
[tests] Only include enabled platforms in the FrameworksInRuntimeNativeDirectory nupkg. (#15501) 2022-07-15 10:27:26 +02:00
Rolf Bjarne Kvinge 72c065cd80
[msbuild] Unify the CompileAppManifest task logic between iOS and Mac. (#15474) 2022-07-14 16:20:56 +02:00
Rolf Bjarne Kvinge c55fbdfef9
[xharness] Collect and upload any crash reports that occurred during the entire test run. (#15466) 2022-07-13 15:16:11 +02:00
Rolf Bjarne Kvinge 423002bc95
[tests] Be explicit about parameters when looking for the Class.FindType method. (#15431)
This makes sure that adding FindType overloads won't break the tests.
2022-07-13 10:59:54 +02:00
Rolf Bjarne Kvinge bc23ece1fc
[monotouch-test] Improve MonoTouchFixtures.ObjCRuntime.ToggleRefRetainDeadlockTest to get a native stack trace upon failure. (#15476) 2022-07-13 10:40:33 +02:00
Rolf Bjarne Kvinge f7772d4705
[dotnet] Accept invalid runtime identifiers for Restore. (#15357) 2022-07-12 09:37:01 +02:00
Rolf Bjarne Kvinge d251b69ae7
[generator] Don't use culture-aware API. (#15392)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-07-11 19:59:36 +02:00
Rolf Bjarne Kvinge 7ad3f2b740
Bump xharness. (#15423)
Bump xharness to get TCC fix:

53594edb70
2022-07-11 19:55:56 +02:00
Rolf Bjarne Kvinge e85d9f8619
[tests] Update tests to find nunit.framework.dll in our own local package folder. (#15422)
Fixes these test failures:

    Xamarin.MTouch.FastDev_LinkAll(iOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_LinkAll(tvOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_LinkAll_Then_NoLink(iOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_LinkAll_Then_NoLink(tvOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_LinkSDK(iOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_LinkSDK(tvOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_LinkWithTest(iOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_LinkWithTest(tvOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_NoFastSim_LinkAll(iOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_NoFastSim_LinkAll(tvOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_NoFastSim_LinkSDK(iOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_NoFastSim_LinkSDK(tvOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_NoFastSim_NoLink(iOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_NoFastSim_NoLink(tvOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_NoLink(iOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_NoLink(tvOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_Sim(iOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.FastDev_Sim(tvOS): System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
    Xamarin.MTouch.RebuildWhenReferenceSymbolsInCode: System.IO.FileNotFoundException : Could not find nunit.framework.dll in /Users/builder/.nuget/packages/nunit/3.12.0/lib/netstandard2.0/nunit.framework.dll. Has the version changed?
2022-07-11 19:55:26 +02:00
Rolf Bjarne Kvinge 840d2e9115
[msbuild] Remove code for watchOS 1 extensions, which we no longer support. (#15327) 2022-07-11 10:54:19 +02:00
Manuel de la Pena eee31cb3fa
Should be || not && (#15367) 2022-06-28 20:29:40 -04:00
Manuel de la Pena 2521d07ab2
[CI] Do not run introspection unless it has been selected. (#15342) 2022-06-24 12:45:26 -04:00
Rolf Bjarne Kvinge 897ce7b736
[xharness] Environment variables need to be fetched. (#15316) 2022-06-23 12:15:21 -04:00
Manuel de la Pena b1ea4b51aa
[CI] Allow tests to be ran in parallel. (#15322)
This allows the CI to run ALL the tests that the project has in
parallel. This is divided in two main changes:

1. Xharness - We move away from using boolenas to use a flag that states
   the tests to run.
2. yaml - We have move the code to use a template per label. This new
   jobs all run in parallel and the results are later collected by a
   funel job
3. pwsh - Added a new class that understands that we have several mark
   downs with the tests results. The classes parses them and them writes
   a single comment (and example can be found here: https://github.com/xamarin/xamarin-macios/pull/15201#issuecomment-1162366240

The changes gives the following advantages vs how we used to run tests:

1. The CI run for all tests moves from taking 13 hours to 3/4 hours
   (depending on the number of bots in the pool).
2. The download needed to verify the results on a case of failure is
   smaller. Rather than downloading several GBs we now just download
   that part of the html that we are interested in.
3. Better bot utlization. Bots are just used to a max of 2 hours, this
   means that we can use the bots better since they are fragmented.
4. Less VMs. VSDrops has added support for macOS and Linux, we take
   advanges of that here.


Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-06-23 08:54:21 -04:00
Manuel de la Pena f02a74af7d
[Tests] Bump Newtonsoft.Json version (#15329)
Bump the version to fix:

* https://github.com/xamarin/xamarin-macios/security/dependabot/1
* https://github.com/xamarin/xamarin-macios/security/dependabot/2

The dependency is in a tests, but this way we make the warning fo away.
2022-06-23 08:51:51 -04:00
Rolf Bjarne Kvinge 9ff8a6b3da
[devops] Collect diagnostic logs from the simulator. (#15215)
Collect diagnostic logs from the simulator to try to get better diagnostic information for https://github.com/xamarin/maccore/issues/2558.

Interestingly it seems like just collecting diagnostic information makes the problem much less likely to occur...
2022-06-22 23:18:52 +02:00
Manuel de la Pena fae8c53bbf
[Tests] Add missing nuget. (#15313)
Tests work because other tests do use the nugets and gets picked up by
the runner. Yet, if we execute this projects witjout others, the tests
will fail when trying to use the nunit2 format.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-06-22 17:10:27 -04:00
Rolf Bjarne Kvinge 3be1d9d760
Use unix-style line endings in project files. (#15303)
This also removes the BOM in a few project files.

This is a whitespace-only change, as can be seen here: https://github.com/xamarin/xamarin-macios/pull/15303/files?w=1
2022-06-21 17:22:58 +02:00
Rolf Bjarne Kvinge e3bc284ab1
[build] Set DEVELOPER_DIR and MD_APPLE_SDK_ROOT to the Xcode we're using. (#15266)
This makes it not necessary to check for the currently selected Xcode in our
system dependency check. It also means it'll become much easier to work with
multiple branches simultaneously where each branch needs its own Xcode.
2022-06-20 09:52:21 +02:00
Rolf Bjarne Kvinge 42c1c66a14
[SceneKit] Fix SCNMatrix4 in .NET. Fixes #15094. (#15160)
When we changed SCNMatrix4 to be column-major instead of row-major in .NET, there
were several other related changes we should have done but didn't do. In particular
we should have made transformation operations based on column-vectors instead of
row-vectors.

In legacy Xamarin, a vector would be transformed by a transformation matrix by doing
matrix multiplication like this:

    [ x y z w] * [ 11 21 31 41 ]
                 | 12 22 32 42 |
                 | 13 23 33 43 |
                 [ 14 24 34 41 ]

In this case the vector is a row-vector, and it's the left operand in the multiplication.
When using column-major matrices, we want to use column-vectors, where the vector
is the right operand, like this:

    [ 11 21 31 41 ] * [ x ]
    | 12 22 32 42 |   | y |
    | 13 23 33 43 |   | z |
    [ 14 24 34 41 ]   [ w ]

This affects numerous APIs in SCNMatrix4, SCNVector3 and SCNVector4:

* The M## fields have been changed to make the first number the column and the
  second number the row, to reflect that it's a column-major matrix (this is
  also how it's defined in the native SCNMatrix4 type).
* Functions that return a transformation matrix have been modified to return column-vector
  transformers. Technically this means that these matrices are transposed compared
  to legacy Xamarin. The functions involved are:
    * CreateFromAxisAngle
    * CreateRotation[X|Y|Z]
    * CreateTranslation
    * CreatePerspectiveFieldOfView
    * CreatePerspectiveOffCenter
    * Rotate
    * LookAt
* Combining two column-vector transforming transformation matrices is done by multiplying
  them in the reverse order, so the Mult function (and the multiplication operator)
  have been modified to multiply the given matrices in the opposite order (this matches
  how the SCNMatrix4Mult function does it). To make things clearer I've changed the
  parameter names for XAMCORE_5_0.
* Functions that transform a vector using a transformation matrix have been modified
  to do a column-vector transformation instead of a row-vector transformation. This
  involves the following functions:
    * SCNVector3.TransformVector
    * SCNVector3.TransformNormal
    * SCNVector3.TransformNormalInverse
    * SCNVector3.TransformPosition
    * SCNVector4.Transform
* Numerous new tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/15094.
2022-06-17 20:17:05 +02:00
Rolf Bjarne Kvinge ab52bb2f45
[msbuild] Unify the DetectSdkLocations task logic between iOS and Mac. (#15256)
This was mostly a clean merge, with a few minor differences:

* We no longer compute whether we're running in the simulator or not when building for Mac Catalyst.
* The task now supports building remotely for macOS (due to code sharing).
  Will be useful if we ever support building macOS apps remotely.
* We now call AppleSdkSettings.Init () on macOS. No idea why we weren't
  before, but it seems logical for macOS to behave like our other platforms.

There shouldn't be any other functional differences.
2022-06-16 23:52:43 +02:00
TJ Lambert db9412b542
[passkit] Add nullability to (generated and manual) bindings (#15262)
* Validating Null ignores and adding tests

* add nullability

* use is null

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-06-15 11:33:06 -05:00
Rolf Bjarne Kvinge 011f9776fd
[tests] Ignore the CS1416 warning by default in .NET test projects. (#15234) 2022-06-15 15:07:13 +02:00
Rolf Bjarne Kvinge d5e8656b53
[introspection] Fix protocol checks on iOS and tvOS 12.4. (#15265) 2022-06-15 12:18:04 +02:00
Rolf Bjarne Kvinge 8adbefdac8
[runtime] Fix 'skip_nested_brace' to not read past the string. Fixes #15253. (#15257)
Fix 'skip_nested_brace' to not double skip characters.

Also add a test.

Fixes https://github.com/xamarin/xamarin-macios/issues/15253.
2022-06-14 14:26:07 +02:00
Rolf Bjarne Kvinge 0fa87fef48
[introspection] Fix according to macOS 12.4. Fixes #15229. (#15230)
* Ignore anything Chip-related, the framework was removed from macOS.
* Fix reporting errors some protocol-related errors so that they're actually
  reported as errors (by calling 'ReportError' instead of just adding the
  errors to a list that doesn't affect anything else).
* Ignore the NSUserActivityRestoring protocol, according to the macOS headers
  it's attached to NSResponder using a category, which is invisible at
  runtime. Due to the previous point this didn't show up before, but once at
  least another error (which happened with the Chip framework), then this was
  listed as well.
* Add ignores for a couple of protocols.

Fixes https://github.com/xamarin/xamarin-macios/issues/15229.
2022-06-13 09:55:24 +02:00
Manuel de la Pena c1b5c4029c
[Tests] Ensure we do check the catalyst version on catalyst. (#15240) 2022-06-09 17:28:00 -04:00
Rolf Bjarne Kvinge 38b0a2fafd
[tests] Fix nullability warning in the .NET tests. (#15213) 2022-06-09 07:39:22 +02:00
Rolf Bjarne Kvinge 77b8b61639
[tools] Make sure to finish the P/Invoke generator output before running the static registrar. Fixes #15190. (#15214)
Otherwise the P/Invoke generator leaves partial results in the static
registrar class, essentially saying things like "we've processed CoreMidi, no
need to add an #include for this framework", and then we'd generate the static
registrar code and that code would lack the #include for CoreMidi.

Finishing the P/Invoke generator output will clear out any state stored in the
static registrar.

Also fix a few other issues to make the generated P/Invoke wrapper code work,
and add a test.

Fixes https://github.com/xamarin/xamarin-macios/issues/15190.
2022-06-09 07:38:45 +02:00
Manuel de la Pena c68372d6f4
[CI] Make sure that we check the versions catalina in the tests. Fixes test failures. (#15224) 2022-06-08 17:35:31 -04:00
Ryan Pendleton 49249344e9
[UIKit] Correct nullability attributes for parts of UIKit (#15200)
These changes correct some of the nullability attributes for the UIKit bindings. Although UIKit has several hundred lines of xtro-sharpie ignores related to nullability, this PR only fixes a few of them.

I wasn't sure where to draw the line, but in the end, I essentially fixed most of `UIViewController` and all of `UITableView` and `UICollectionView`. These classes were the ones that led to the most `// ReSharper disable` comments being added in my team's codebase, and/or that led to crashes being introduced by devs following ReSharper's suggestions to remove "unnecessary" null-checks.

These changes were largely based on the instructions given by @spouliot in [#6154](https://github.com/xamarin/xamarin-macios/issues/6154#issuecomment-620014843). However, I noticed the xtro-sharpie ignore files have been duplicated in the `api-annotations-dotnet` directory since then, so I updated the .ignore and .todo files in that directory as well.

If the process has changed since that comment was written, I can make any additional changes that are needed.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-06-08 11:21:54 +02:00
Rolf Bjarne Kvinge a1d0b6eba9
Make our local .NET the default .NET for the build. (#15086)
Make our local .NET the default .NET (in the root's global.json), and then if
a directory wants to use the system .NET, then that directory would have to
opt-in (using its own global.json).

This way we don't have to copy global.json/NuGet.config files around to run
tests with the correct .NET setup.
2022-06-07 10:11:02 +02:00
Rolf Bjarne Kvinge dcecc4dbf9
[msbuild] Fix computing the output path for SceneKitAsset items with custom Link metadata. Fixes #15104. (#15186)
Co-authored-by: Chris Hamons <chris.hamons@xamarin.com>
2022-06-07 10:08:53 +02:00