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

18075 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 48f5591829
[devops] Improved diagnostics and implement deadlocked process termination. (#21317)
* Unify the code to collect diagnostic information about a bot.
* Unify some of the cleanup code to prepare a bot as well.
* Implement code to terminate processes on a bot that's used more than a day
  of CPU (presumably these processes are stuck for some reason).
2024-10-11 13:26:45 +02:00
Rolf Bjarne Kvinge 2f7c126ac9
[dotnet] Fix building universal apps using NativeAOT when the default RuntimeIdentifiers value is set. Fixes #19391. (#21412)
We need to set "UseCurrentRuntimeIdentifier=false", we must only set it for
the outer build for universal builds - when `RuntimeIdentifiers` is set - but
that means we can only do it *after* we set any default value for
`RuntimeIdentifiers`.

Fixes https://github.com/xamarin/xamarin-macios/issues/19391#issuecomment-2405499973.
2024-10-11 12:13:29 +02:00
Rolf Bjarne Kvinge 657f0169c5
[tools] Ignore any interpreter settings when the current runtime isn't MonoVM. Fixes #20398. (#21406)
Tests that exercise this code path will be included in a different PR.

Fixes https://github.com/xamarin/xamarin-macios/issues/20398.
2024-10-11 09:32:15 +02:00
Rolf Bjarne Kvinge 22cb6e8cb2
[devops] Remove the wget dependency. (#21405)
It doesn't look like it's used anywhere (and I don't have it on my system either).
2024-10-11 08:37:41 +02:00
Rolf Bjarne Kvinge 46ed02ba8c
[tests] Ignore a few tests that fail on iOS Simulator/arm64. (#21403)
Ref: https://github.com/xamarin/xamarin-macios/issues/19781
2024-10-11 08:36:29 +02:00
Rolf Bjarne Kvinge 43cd02dc23
[msbuild] Improve the error message when the SupportedOSPlatformVersion is lower than the minimum. Fixes #21368. (#21369)
This isn't very user friendly:

    ILLink : unknown error IL7000: An error occurred while executing the custom linker steps. Please review the build log for more information.
    ILLINK : error MT0073: Microsoft.iOS 18.0.8337 does not support a deployment target of 10.0 for iOS (the minimum is 11.0). Please select a newer deployment target in your project's Info.plist or change the SupportedOSPlatformVersion property in your project file.
    ILLINK : error MT2301: The linker step 'Setup' failed during processing: Microsoft.iOS 18.0.8337 does not support a deployment target of 10.0 for iOS (the minimum is 11.0). Please select a newer deployment target in your project's Info.plist or change the SupportedOSPlatformVersion property in your project file.
    [...]/packages/microsoft.net.illink.tasks/8.0.8/build/Microsoft.NET.ILLink.targets(87,5): error NETSDK1144: Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false.

So improve this to only show a single error message:

    The SupportedOSPlatformVersion value '10.0' in the project file is lower than the minimum value '11.0'.

Fixes https://github.com/xamarin/xamarin-macios/issues/21368.
2024-10-10 20:10:04 +02:00
Rolf Bjarne Kvinge 1b75eb73e4
[CryptoTokenKit] Fix detecting .NET 10. (#21400) 2024-10-10 18:57:20 +02:00
Rolf Bjarne Kvinge d293744125
[devops/github] Update a few things for .NET 10. (#21392) 2024-10-10 14:26:41 +02:00
Rolf Bjarne Kvinge 9daafdae64
[builds] Remove all legacy logic. (#21307)
We still need some of the source files from the legacy Mono library, but it's
only a few files, so just add them to the git repo.

Also implement caching of the .NET download, which speeds up clean rebuilds
significantly.

Note: all the files in the `builds/mono-ios-sdk-destdir` are a straight import
from the Mono archive, so those shouldn't need much reviewing (nor will I
change them unless absolutely necessary).
2024-10-10 14:21:42 +02:00
Rolf Bjarne Kvinge 953a2b4564
[src] Remove legacy build logic. (#21353) 2024-10-10 11:26:25 +02:00
Rolf Bjarne Kvinge 7781c5184e
[system-dependencies] Remove the cmake dependency. (#21375)
It was needed to build Mono from source, which we haven't done in quite
a few years now.
2024-10-10 11:23:39 +02:00
Rolf Bjarne Kvinge 569a5d47e6
Remove the opentk submodule. (#21370)
It's only used in legacy Xamarin, so it's no longer needed.
2024-10-10 10:27:00 +02:00
Rolf Bjarne Kvinge 55baa59437
[UIKit] Fix a few UITraitCollection bindings. Fixes #21377. (#21380)
The methods 'GetTraitCollectionWithTraits' and 'GetTraitCollectionByModifyingTraits' takes a callback, but the callback
had the wrong signature.

So introduce a new overload for each of these methods, using a delegate with the correct signature.

Also deprecate 'FromTraitsFromCollections' according to both headers and documentation.

Fixes https://github.com/xamarin/xamarin-macios/issues/21377.
2024-10-10 10:22:10 +02:00
Rolf Bjarne Kvinge 3a16b7f0ad
[msbuild] Resolve the full path to the compiled entitlements in the CompileEntitlements task. (#21372)
This saves a round-trip between the Mac and Windows machine for remote builds.
2024-10-10 09:51:01 +02:00
Rolf Bjarne Kvinge 8134042f74
[fsharp] Remove all build logic. (#21352)
We don't ship any F# code in .NET.
2024-10-10 09:43:15 +02:00
Rolf Bjarne Kvinge 5affb0b4e9
[tests] Remove legacy logic to package and run macOS tests. (#21384) 2024-10-10 09:41:56 +02:00
Rolf Bjarne Kvinge e860f533da
[build] Fix installing the arm64 version of .NET. (#21396)
On the bots we're executing with Rosetta, and 'arch' returns 'i386' under
Rosetta, so detect when we're executing under Rosetta, and install the arm64
version of .NET in that case as well.

Also fix a bug in the same area in our tests.
2024-10-09 16:57:00 +02:00
Manuel de la Pena 0db186c758
[CI] Move the release steps to a new pipeline. (#21383)
This new pipeline will only be executed when the CI build is completed
by any of the branches that have been listed to be included in the
trigger.

This pipeline because it does a release has to extend the 1ES template.

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-10-08 12:37:10 -04:00
Manuel de la Pena 85b7f563bb
[CI] Fix errors in the new apiscan pipelines. (#21385)
Allow the pipeline to run correctly. We could not test it before we
landed the yaml, this commit fixes all the issues we have.
2024-10-08 12:21:31 -04:00
Manuel de la Pena 4544df6755
[CI] Stop building classic pkgs. (#21382) 2024-10-07 14:56:07 -04:00
Manuel de la Pena c0c457e32b
[CI] Intermediate step to move the api scan out of the build. (#21357)
Due to the way that resource triggers are implemented in VSTS, we are
triggering tests more than once. To solve the issue, we need to move the
diff stages to different pipelines. This is the first step to allow use
to get less stages in the build so that we can reduce the number of
tests that are triggered.
2024-10-07 14:55:07 -04:00
Rolf Bjarne Kvinge 5ef0d91b33
[msbuild/tests] Use 'dotnet test' for the MSBuild tests (take 2). (#21363)
This is another step towards removing Mono.

This required a few changes:

* Nullability updates in test code.
* Explicitly sorted list of strings in a warning message, to make the warning text stable.
* Stopped allowing the test assemblies to see internals of the task assembly. This was necessary for to solve a problem with duplicate types:
    * The netstandard2.0 version of `System.Reflection.Metadata.dll` contains
      the `UnconditionalSuppressMessageAttribute` type (internally).
    * Since we ILMerge the tasks assembly, this type ends up in
      Xamarin.iOS.Tasks.dll (internally).
    * The test assembly can't be a net472 assembly, because that means using
      the netfx/desktop versions of the Microsoft.Build.* assemblies, which
      don't work on .NET (they check for Mono, but .NET isn't Mono, so the
      check fails and a PlatformNotSupportedException is thrown).
    * So I bumped the test assembly to be a net8.0 assembly, but then there's
      a conflict between the `UnconditionalSuppressMessageAttribute` shipped
      in .NET vs the one in `Xamarin.iOS.Tasks.dll` (because the test assembly
      can see the internals of `Xamarin.iOS.Tasks.dll`).
    * The fix that _doesn't work_ is to not merge system assemblies in the
      `Xamarin.iOS.Tasks.dll` assembly anymore. `Xamarin.iOS.Tasks.Windows.dll`
      already does this, but it doesn't work when building remotely.
    * The fix that seems to work is to just not allow the test assemblies to
      see the internals of the task assembly. This is really an anti-pattern
      anyway, so no big loss. This required a few changes (make some API in
      the task assembly public, remove some legacy tests that don't apply
      anymore in .NET, etc.)
2024-10-07 18:14:01 +02:00
Manuel de la Pena 1dc54f6241
[CI] Remove stages related to the old pkg signing and notarization. (#21376)
Clean the CI from all references to the old pkg notarisation and
signing.

- Remove the templates that did the jobs.
- Remove the parameters that allowed to skip the signing and
notarisation.
- Remove the references to the scripts.

This simplifies greatly the yaml.
2024-10-07 09:14:28 -04:00
Manuel de la Pena 8bb8f6f82c
[CI] Split variables to reduce needed rights. (#21371)
Split the variables and document their usage. Because we are going to
have to add more pipelines we want to limit the amount of secrets a new
pipeline requests and uses.

The split is as follows:

- variables/common.yml: needed by all.
- variables/api-scan.yml: needed by the api scan pipeline.
- variables/signing.yml: needed by pipeline that need to perform
signing.

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-10-04 16:09:10 -04:00
Rolf Bjarne Kvinge b7a317d06c
[bgen] Improve performance a little bit when calling functions that return retained objects. (#21297)
Instead of doing this:

```cs
var obj = Runtime.GetINativeObject&lt;T&gt(handle, false);
NSObject.ReleaseDangerous (handle);
```

we now do this:

```cs
var obj = Runtime.GetINativeObject&lt;T&gt(handle, true);
```

Less generated code, and better performance too.

This was found while investigating https://github.com/xamarin/xamarin-macios/issues/21290.
2024-10-04 10:00:27 +02:00
Rolf Bjarne Kvinge 133bd65abd
Merge net9.0 into main. (#21349) 2024-10-04 09:22:01 +02:00
Rolf Bjarne Kvinge f800899ebc
[tests] Include more information in asserts in MonoTouchFixtures.Security.RecordTest.DeskCase_83099_InmutableDictionary. (#21354)
This will hopefully help us track down a random test failure in this test.

Ref: https://github.com/xamarin/maccore/issues/868
2024-10-03 19:53:11 +02:00
Rolf Bjarne Kvinge 129ab97506
[tests] Fix generation for a few variables in test[-system].config. (#21344)
Lines end with a newline character...
2024-10-03 19:12:57 +02:00
Rolf Bjarne Kvinge 5374856aa1
Bump API references to latest stable release. (#21355) 2024-10-03 11:19:16 +02:00
Rolf Bjarne Kvinge 6002243ee4
[Vision] Bind VNVisionVersionNumber. Fixes #21342. (#21350)
Fixes https://github.com/xamarin/xamarin-macios/issues/21342.
2024-10-03 11:15:02 +02:00
Rolf Bjarne Kvinge 2a3b250aba
[tests] Fix FontManagerTest.RegisterFontDescriptors_WithCallback to be a bit more lax. Fixes #6690. (#21348)
This way we can actually run the test.

Fixes https://github.com/xamarin/xamarin-macios/issues/6690.
2024-10-03 11:14:31 +02:00
Rolf Bjarne Kvinge 260b12a99d
[AppKit] Remove the NS[Open|Save]Panel constructors in XAMCORE_5_0. Fixes #6474. (#21346)
These constructors haven't worked since macOS 10.14 (see #6474), so just
remove them (when we can make breaking changes).

Fixes https://github.com/xamarin/xamarin-macios/issues/6474.
2024-10-03 11:13:43 +02:00
Rolf Bjarne Kvinge 07256bf177 [tests] Update list of expected native libraries we link with for .NET 9. 2024-10-03 10:45:58 +02:00
Rolf Bjarne Kvinge 13d6013d9c Merge remote-tracking branch 'origin/main' into dev/rolf/merge-net9.0-into-main 2024-10-02 20:02:22 +02:00
Rolf Bjarne Kvinge f6501e922f
[dotnet] Don't link with BrowserEngineKit. Fixes #21324. (#21337)
Fixes https://github.com/xamarin/xamarin-macios/issues/21324.
2024-10-02 19:54:47 +02:00
Rolf Bjarne Kvinge 3317327c23
[tests] Fix building the custom-type-assembly assembly from inside a project file. (#21347)
Building the custom-type-assembly assembly doesn't work quite right if the
RuntimeIdentifier(s) variables are set in the environment from the project
file, so don't forward those to the sub-make we execute to build the assembly.

This fixes an issue where building monotouch-test would fail locally, because
building the custom-type-assembly assembly would fail.

Also remove legacy Xamarin logic.
2024-10-02 19:53:47 +02:00
Rolf Bjarne Kvinge f1fbfc07f6
Merge branch 'main' into dev/rolf/merge-net9.0-into-main 2024-10-02 19:52:40 +02:00
Rolf Bjarne Kvinge abcec04b75
Revert "[msbuild/tests] Use 'dotnet test' for the MSBuild tests. (#21263)" (#21356)
This reverts commit 15c1e7527e.

It breaks the Windows tests.
2024-10-02 19:51:31 +02:00
Manuel de la Pena 5a0d412c87
[CI] Use the full path for triggering resources. (#21338)
VSTS recommends this in their docs. We are going to do it to make it
simpler to track what triggers what.
2024-10-01 15:42:37 -04:00
Rolf Bjarne Kvinge fd1323c562 Merge remote-tracking branch 'origin/net9.0' into merge-net9.0-into-main 2024-10-01 18:37:41 +02:00
Rolf Bjarne Kvinge 503e51d21e
[net9.0] [build] Remove duplicate variable definition. (#21332)
The variable TRACKING_DOTNET_RUNTIME_SEPARATELYis already defined further
above in this file, so just remove the second definition.

I believe this happened due to an incorrect merge conflict resolution at some
point.
2024-10-01 18:37:09 +02:00
Rolf Bjarne Kvinge 15c1e7527e
[msbuild/tests] Use 'dotnet test' for the MSBuild tests. (#21263)
This is another step towards removing Mono.

This required a few changes:

* Nullability updates in test code.
* Explicitly sorted list of strings in a warning message, to make the warning text stable.
* Stopped merging system assemblies in the merged tasks assembly. This was necessary for to solve a problem with duplicate types:
    * The netstandard2.0 version of `System.Reflection.Metadata.dll` contains
      the `UnconditionalSuppressMessageAttribute` type (internally).
    * Since we ILMerge the tasks assembly, this type ends up in
      Xamarin.iOS.Tasks.dll (internally).
    * The test assembly can't be a net472 assembly, because that means using
      the netfx/desktop versions of the Microsoft.Build.* assemblies, which
      don't work on .NET (they check for Mono, but .NET isn't Mono, so the
      check fails and a PlatformNotSupportedException is thrown).
    * So I bumped the test assembly to be a net8.0 assembly, but then there's
      a conflict between the `UnconditionalSuppressMessageAttribute` shipped
      in .NET vs the one in `Xamarin.iOS.Tasks.dll` (because the test assembly
      can see the internals of `Xamarin.iOS.Tasks.dll`).
    * The fix that seems to work is to *not* merge system assemblies in the
      `Xamarin.iOS.Tasks.dll` assembly. `Xamarin.iOS.Tasks.Windows.dll`
      already does this, so hopefully there are no problems on Windows, and on
      macOS our tests doesn't reveal any problems.
2024-10-01 17:54:27 +02:00
Rolf Bjarne Kvinge 9647b45ce4 Merge remote-tracking branch 'origin/net9.0' into merge-net9.0-into-main 2024-10-01 17:03:30 +02:00
Rolf Bjarne Kvinge 00444d1507
[msbuild] Don't try to look for library resources to unpack from BCL assemblies. Fixes #19511. (#21305)
We know BCL won't have library resources to unpack, so there's no need to
spend any time looking at them.

This also required porting the UnpackLibraryResources task to use
System.Reflection.Metadata, because MetadataLoadContext requires the reference
assemblies to be available to resolve assembly dependencies (and the idea is
to not have to pass any reference assemblies to the task).

Fixes https://github.com/xamarin/xamarin-macios/issues/19511.
Fixes https://github.com/xamarin/xamarin-macios/issues/15030.
2024-10-01 16:20:23 +02:00
Rolf Bjarne Kvinge 88310119fd
[devops] Rework how we hide GitHub comments. (#21320)
* Whenever we add a GitHub comment, also provide a comment id.
* When adding a GitHub comment, use that comment id to hide any previous comments with the same id.

It turns out this simplifies the code a lot, and additionally we now correctly
hide every comment we report whenever a step or stage is re-executed.
2024-10-01 14:44:09 +02:00
Rolf Bjarne Kvinge 6b2e93651a
[UIKit] Improve code for UISegmentedControl. Fixes #21289. (#21299)
1. Enable nullability.
2. Move Get|SetTitleTextAttributes to generated code.
3. Remove dead code (pre-.NET code paths).

Point 2. fixes #21289, so add tests for this scenario.

Fixes https://github.com/xamarin/xamarin-macios/issues/21289.
2024-10-01 12:24:56 +02:00
Rolf Bjarne Kvinge 89195184c8
[actions] There's no reason to keep testing a .NET-only configuration. (#21330)
Because there's nothing but .NET now.
2024-10-01 11:44:21 +02:00
Rolf Bjarne Kvinge c4a5627f03
[PassKit] Finish implementation of PKPayLaterValidateAmount. Fixes #19271. (#21339)
Fixes https://github.com/xamarin/xamarin-macios/issues/19271.
2024-10-01 11:32:43 +02:00
Rolf Bjarne Kvinge 3db59cc8d5
[tests] Fix inclusion of Directory.Build.props up the directory hierarchy. (#21341)
The first Directory.Build.props should be imported, so do that.
2024-10-01 10:36:22 +02:00
Rolf Bjarne Kvinge 76b6538845
[tests] Ignore a few tests that fail on Mac Catalyst/arm64. (#21322)
Also remove some outdated watchOS ignores.

Ref: https://github.com/xamarin/xamarin-macios/issues/19781
2024-10-01 01:27:22 +02:00