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

5681 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 105a12d637 Merge remote-tracking branch 'origin/main' into net7.0-merge-main-2022-08-23 2022-08-23 11:08:56 +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
dotnet-maestro[bot] 62055c56fb
[net7.0] Update dependencies from dotnet/installer (#15657)
* Update dependencies from https://github.com/dotnet/installer build 20220807.1

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22407.1

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220808.5

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22408.5

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220809.23

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22409.23

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220810.15

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22410.15

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220812.1

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22412.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22411.2 (parent: Microsoft.Dotnet.Sdk.Internal

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220813.1

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22413.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22412.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220814.7

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22414.7

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22412.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220816.2

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.1.22416.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22415.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Re-generate global.json

* Update dependencies from https://github.com/dotnet/installer build 20220817.1

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-rc.1.22405.9 -> To Version 7.0.100-rc.2.22417.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22415.4 (parent: Microsoft.Dotnet.Sdk.Internal

* Re-generate global.json

* [dotnet] Include the 'marshal-ilgen' component. Fixes #15668.

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

* [dotnet] Enable serialization discovery in the linker. Fixes #15676.

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

* [tests] Make the dont link tests actually not link for macOS.

* [tests] The 'trimmode copy' test needs an adjustment after recent linker changes.

* [dotnet] Don't set a default 'TrimMode' value.

We already compute a TrimMode value depending on other properties
(MtouchLink/LinkMode - or a default value if those aren't set), and the logic
to compute the default value is not executed if we set a TrimMode default (because
TrimMode overrides any MtouchLink/LinkMode values).

* [tests] Workaround a bug in 'dotnet build'.

Workaround a bug in 'dotnet build' where escaping semicolons interferes with
our ability to pass RuntimeIdentifiers to the build on the command line.

* [dotnet] Update expected bundle contents according to updated runtime.

* [tests] Update expected error message texts.

* Bump to RC 2.

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-08-19 12:53:56 +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
Alex Soto 1434ede326 Merge remote-tracking branch 'xamarin/main' into net7.0-a-new-hope 2022-08-05 17:58:58 -04: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
dotnet-maestro[bot] ec949c9991
[net7.0] Update dependencies from dotnet/installer (#15426)
* Update dependencies from https://github.com/dotnet/installer build 20220707.5

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.6.22306.4 -> To Version 7.0.100-preview.7.22357.5

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22273.1 -> To Version 7.0.100-1.22354.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Update global.json

* Update dependencies from https://github.com/dotnet/installer build 20220708.13

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.6.22306.4 -> To Version 7.0.100-preview.7.22358.13

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22273.1 -> To Version 7.0.100-1.22354.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Bump global.json

* Update dependencies from https://github.com/dotnet/installer build 20220711.1

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.6.22306.4 -> To Version 7.0.100-preview.7.22361.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22273.1 -> To Version 7.0.100-1.22354.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Bump global.json

* Update dependencies from https://github.com/dotnet/installer build 20220712.1

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.6.22306.4 -> To Version 7.0.100-preview.7.22362.1

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22273.1 -> To Version 7.0.100-1.22354.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Re-generate global.json

* [registrar] Improve naming of generated P/Invoke wrappers.

C# method names generated by the C# compiler can have all sorts of invalid
characters, so just sanitize this a bit.

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

* Update dependencies from https://github.com/dotnet/installer build 20220713.4

Microsoft.Dotnet.Sdk.Internal
 From Version 7.0.100-preview.6.22306.4 -> To Version 7.0.100-rc.1.22363.4

Dependency coherency updates

Microsoft.NET.ILLink.Tasks,Microsoft.NETCore.App.Ref,Microsoft.AspNetCore.App.Ref
 From Version 7.0.100-1.22273.1 -> To Version 7.0.100-1.22362.1 (parent: Microsoft.Dotnet.Sdk.Internal

* Re-generate global.json

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
2022-07-14 10:14:29 +02:00
Rolf Bjarne Kvinge 999e7235ea Merge remote-tracking branch 'origin/main' into net7.0 2022-07-14 08:50:07 +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 5e993ebe49 Merge remote-tracking branch 'origin/main' into net7.0 2022-07-12 11:18:39 +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
Rolf Bjarne Kvinge 352a7cb104 Merge remote-tracking branch 'origin/main' into net7.0 2022-06-30 23:54:10 +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 9e6e2449a1 Merge remote-tracking branch 'origin/main' into net7.0 2022-06-20 12:13:31 +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 2b84ce2ccb Merge remote-tracking branch 'origin/main' into net7.0 2022-06-15 13:34:23 +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 be0f63615e Merge remote-tracking branch 'origin/main' into net7.0 2022-06-13 10:12:57 +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 efba4cd38f Merge remote-tracking branch 'origin/main' into net7.0 2022-06-09 14:08:52 +02: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 db91c70f41 Merge remote-tracking branch 'origin/main' into net7.0 2022-06-07 11:10:24 +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