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

288 Коммитов

Автор SHA1 Сообщение Дата
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 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
Rolf Bjarne Kvinge 1a4f376b74 [net9.0] Merge main into net9.0. 2024-09-24 23:57:47 +02:00
Rolf Bjarne Kvinge ba954b9c24
[builds] Delete most of the legacy logic. (#21239) 2024-09-20 17:44:15 +02:00
Rolf Bjarne Kvinge f634ea9b3c Merge remote-tracking branch 'origin/main' into dev/rolf/bump-main-in-net9.0-2024-09-18 2024-09-19 09:48:34 +02:00
Rolf Bjarne Kvinge 73719863b8
[builds] Fix restoring ilrepack. (#21265)
😡 https://github.com/dotnet/sdk/issues/11432
2024-09-19 08:57:33 +02:00
Alex Soto 5b72d86f02 Merge remote-tracking branch 'xamarin/main' into xcode16 2024-07-16 22:58:16 -04:00
Alex Soto 4486eb3b9f Merge remote-tracking branch 'xamarin/main' into dev/alex/main-net9.0 2024-07-11 18:53:54 -04:00
Rolf Bjarne Kvinge 219c74a3c4
[xcode15.4] Update bindings to Xcode 15.4 (#20865)
Co-authored-by: Alex Soto <alex@soto.dev>
2024-07-11 14:09:52 -04:00
Alex Soto 2e5ef1eb1c
[xcode15.3] Bump to Xcode 15.3 bindings (#20780)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2024-07-11 11:41:31 +02:00
Rolf Bjarne Kvinge 4b5e6c9b2d Xcode 16, here we come 2024-07-09 10:22:35 +02:00
Rolf Bjarne Kvinge 0e7a808958 [net9.0] Merge main into net9.0. 2024-07-08 18:45:06 +02:00
Rolf Bjarne Kvinge 95df610900
[build] Parameterize the .NET download script url. (#20806)
This way it can easily be overridden when building from the command line (to provide a different url if the normal url doesn't work for some temporary reason).
2024-07-03 20:12:40 +02:00
Rolf Bjarne Kvinge b8a2b69c30 [net9.0] Bump min macOS to 12.0 and min Mac Catalyst to 15.0. 2024-02-28 12:06:40 +01:00
Rolf Bjarne Kvinge b25691dc5d Merge remote-tracking branch 'origin/net9.0' into bump-main-in-net9.0-2024-01-29 2024-02-07 10:49:57 +01:00
Rolf Bjarne Kvinge 3fb52c3ed7 [tests] Bump min OS versions in all tests. 2024-01-29 15:24:30 +01:00
Rolf Bjarne Kvinge ec270d0e4e [net9.0] Bump min iOS and tvOS version to 12.2.
Ref: https://github.com/xamarin/xamarin-macios/issues/19392
2024-01-29 10:22:26 +01:00
Rolf Bjarne Kvinge 74d83ca7e3
[dotnet] Differentiate between "OS version we support as TargetPlatformVersion" and "OS version we support or have supported". (#19882)
The `SdkSupportedTargetPlatformVersion` item group is used for (at least) two things:

1. Generate the `_OR_GREATER` preprocessing symbols:

bfd2919bc4/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets (L230-L237)

2. Validate the TargetPlatformVersion:

bfd2919bc4/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets (L233-L246)

The problem is that these two uses aren't equivalent.

Take for example the following scenario:

We release bindings for iOS 10, and a library developer takes advantage of the
bindings for the new iOS version, while at the same time supporting
multi-targeting to older platforms:

```csharp
    #if IOS10_0_OR_GREATER
        UseNewApi ();
    #else
        UseOldApi ();
    #endif
```

Time passes, iOS 11 comes out, and we stop shipping bindings specifically for
iOS 10 (the APIs themselves would be included in the bindings for iOS 11). The
code above should continue to work, but iOS 10 is not a valid
TargetPlatformVersion anymore. However, with the current situation there's no
way to express this, because the moment we remove the "10.0" version from
SdkSupportedTargetPlatformVersion, the IOS10_0_OR_GREATER define isn't
generated anymore.

We discussed this in a meeting internally, and the suggestion that came up was
to use metadata to handle this situation, and we've decided to add the
"DefineConstantsOnly=true" metadata to items in
SdkSupportedTargetPlatformVersion that are "OS versions we support or have
supported", but not "OS versions we support as TargetPlatformVersion".

Note: we're adding this to .NET 8, but .NET will not understand the new
metadata until .NET 9, which means this won't be a breaking change until .NET
9.

In a different PR I'll add logic to warn if a project uses a
TargetPlatformVersion that is no longer valid (so that people will start
getting a warning in .NET 8 instead of getting surprised by a build error in
.NET 9).

Ref: https://github.com/dotnet/sdk/issues/38016
2024-01-23 19:17:25 +01:00
Rolf Bjarne Kvinge 21c40d496b
[build] Add missing versions. (#19816)
This fixes the build.
2024-01-12 15:59:37 +01:00
Rolf Bjarne Kvinge b97fac0fe4 Add missing versions. 2024-01-12 14:50:04 +01:00
Rolf Bjarne Kvinge 47c5bbc57f
[builds] Create a separate Versions.plist.in for each .NET platform. (#19796)
In .NET the 4 platforms are 4 separate products, so it makes sense that each
Versions.plist only contains information for the corresponding platform.

This means we can share the same logic for all .NET platforms, instead of
having to special-case macOS.

It also decouples legacy logic from .NET logic, which makes it easier to
remove legacy logic when that time comes.
2024-01-12 13:51:22 +01:00
Rolf Bjarne Kvinge 4c1c0f8ad4
[builds] Use .NET versions for the buildinfo file we put in .NET NuGets. (#19797)
Use the .NET version (the `*_NUGET_VERSION` variables) instead of the
Xamarin.iOS/Xamarin.Mac versions (the `IOS_PACKAGE_VERSION` /
`MAC_PACKAGE_VERSION` variables) for the buildinfo file we put in our .NET
NuGets.

This also means we can share the same logic for all .NET platforms, instead of
having to special-case macOS.

Besides this being the correct value to put in the file (the Xamarin versions
have nothing to do with the .NET versions), it also decouples legacy logic
from .NET logic, which makes it easier to remove legacy logic when that time
comes.
2024-01-12 08:52:30 +01:00
Rolf Bjarne Kvinge 9ed0fb2b9e
[builds] Create a stable path to the local .NET version. (#19762)
This makes scripting easier in some cases.
2024-01-10 10:25:50 +01:00
Rolf Bjarne Kvinge 9bef443d92
[builds] Create Versions.plist/buildinfo for .NET independently of the legacy Xamarin versions. (#19534)
This is one small step towards removing legacy Xamarin one day, since it
removes .NET logic that depends on legacy Xamarin logic.
2023-12-05 15:54:56 +01:00
Rolf Bjarne Kvinge c82b9de7e9
[msbuild] Fix resolving static libraries inside an XCFramework in a NuGet. (#19502)
The ResolveNativeReferences task would incorrectly set Kind=Framework for static
libraries and dylibs if these files came from an XCFramework in the runtimes/native
directory in a NuGet (as opposed to a binding project, or the NuGet built from a
binding project).

Fix this by properly assigning the Kind and PublishFolderType metadata for such static
libraries and dylibs.

Also add a test.
2023-11-27 08:54:48 +01:00
Haritha Mohan da08b89077
[build] Add support for worktree checkouts (#19240)
Was messing around with worktrees but our repo failed to build due to
not identifying the proper git directory.

Fixes #18276
2023-10-19 09:22:37 -07:00
Rolf Bjarne Kvinge 673dd5782b [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-09-08 10:31:44 +02:00
Rolf Bjarne Kvinge 8ac62371e4 [net8.0] Merge main into net8.0. 2023-09-06 12:22:22 +02:00
Rolf Bjarne Kvinge 86c82c91a3
[net8.0-xcode15] [runtime] Bump the min OS version in the Info.plist in Xamarin.framework. (#18912)
Bump the min OS version to match our actual min OS version.
2023-09-05 10:26:44 +02:00
Rolf Bjarne Kvinge f9c2c695d0
[builds] Remove unused code for Mac Catalyst on legacy Xamarin.iOS. (#18899)
We never ended up shipping Mac Catalyst support in Xamarin.iOS, so
remove the corresponding code.
2023-09-05 08:07:58 +02:00
Rolf Bjarne Kvinge 78b649c4e1 [net8.0] Merge main into net8.0. 2023-08-29 11:24:40 +02:00
Rolf Bjarne Kvinge 45225dc88d
[dotnet] Parameterize the pack names. (#18732)
We're going to change the pack names to support multi-targeting, so ahead
of the pack name change I'm changing the existing logic to use a variable
for the pack name in most places (this will make the rename much easier and
simpler).

These changes should have no effect by themselves.
2023-08-29 10:06:46 +02:00
Rolf Bjarne Kvinge a3e2d48335 [net8.0] Merge main into net8.0. 2023-08-08 16:06:04 +02:00
Rolf Bjarne Kvinge dda440363e
[builds] Always download .NET. (#18649)
We always need to have a local .NET, because our T4 scripts are executed
using .NET (which is needed even if we're not building anyhing for .NET).
2023-08-08 07:14:07 +02:00
Rolf Bjarne Kvinge b8c7dc7dc3 [net8.0] Merge main into net8.0. 2023-05-11 11:54:37 +02:00
Rolf Bjarne Kvinge 0ad313fc1c
Use the current version of .NET in a few projects. (#18206) 2023-05-03 22:46:58 +02:00
Rolf Bjarne Kvinge dce0d8efa4
[maestro] Make 'Microsoft.NETCore.App.Ref' depend on 'Microsoft.Dotnet.Sdk.Internal'. (#18026)
This way we always get a consistent build (at the cost of flexibility:
sometimes we won't be getting 'Microsoft.NETCore.App.Ref' updates for a while
if either dotnet/runtime or dotnet/sdk have security fixes in the works, but
this shouldn't be much of an issue for a stable .NET version, since we usually
work with any dotnet/runtime version at that point).

Also fix a duplicated entry for 'Microsoft.NET.Workload.Emscripten.net7.Manifest-7.0.100',
and run 'darc update-dependencies' to update the dependencies.
2023-04-12 08:07:30 +02: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
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
Rolf Bjarne Kvinge e170ba56d8
[dotnet] Rework how we handle manifest version bands. (#17670)
* Use a separate variable for Mono's and Emscripten's manifest version band,
  so that they can diverge (this is a decision from the corresponding teams,
  we don't control it).
* Have a separate variable for our own manifest version band, so that it's
  easier to hard code it if we want to.
* Rename a few variables to make them clearer.
* Remove hardcoded rc.2 logic, we're not using any rc.2 versions right now, so
  that's dead code.
* A few other minor changes.
2023-03-03 13:17:55 +01:00
Andoni Morales Alastruey 4cfccff38e
Fix libs reidentification deployed in a subdirectory (#16706)
Dynamic libraries might be deployed in subdirectories such as libclrjit.dylib from the nuget package cefglue.common:
Contents/MonoBundle/CefGlueBrowserProcess/libclrjit.dylib

The library ID for that library should be: @executable_path/../MonoBundle/CefGlueBrowserProcess/libclrjit.dylib

Instead of: @executable_path/../MonoBundle/libclrjit.dylib

Beside the library ID being wrong, when it's combined with the nuget package microsoft.netcore.app.runtime.osx-x64 providing a library with the same name, both uses the same `ReidentifiedPath`, which can cause a failure in the InstallNameTool tasks that are run in parallel operating on the same temporary file.

The following patch uses the `RelativePath` for the tempory file used by `InstallNameTool` so that there are no clashes with other files with the same name deployed in other directories. It also uses the `RelativePath` to create the correct library id: @executable_path/../../Contents/MonoBundle/CefGlueBrowserProcess/libclrjit.dylib

Partially fixes https://github.com/xamarin/xamarin-macios/issues/15173 for this scenario
2022-12-16 09:17:01 +01:00
Rolf Bjarne Kvinge cdc62aeae9 Merge remote-tracking branch 'origin/net7.0-xcode14.1' into main-net7.0-xcode14.1 2022-11-03 08:21:55 +01:00
Rolf Bjarne Kvinge ab51d827f5
[builds] Improve curl commands to retry harder in case of failures. (#16394)
* Use a variable for the curl command to avoid duplicating all the retry logic.
* Pass --retry-all-failures to curl to retry harder.

Hopefully fixes these errors:

    curl: (56) LibreSSL SSL_read: error:02FFF036:system library:func(4095):Connection reset by peer, errno 54
    make: *** [downloads/ios-release-Darwin-2a19f878dab8d2e62123e0bf29453de553f5402a.7z] Error 56
2022-10-20 14:37:59 +02:00
Rolf Bjarne Kvinge a79e2f87d3 Merge main into net7.0. 2022-10-18 08:12:46 +02:00
Rolf Bjarne Kvinge acdb35186c
[builds] Retry downloads if they fail. (#16354)
Unfortunately builds fail often in CI due to random network errors. So try to
make downloading with curl a bit more resilient by re-trying downloads a few
times before giving up.
2022-10-17 17:54:54 +02:00
Rolf Bjarne Kvinge ed612dcd6e Merge main into net7.0. 2022-09-28 17:17:10 +02:00
Rolf Bjarne Kvinge c7765c5f86
Download all the NuGets we need at the beginning of the build. (#16076)
Hopefully this will avoid random network problems with NuGet later on.

Most of the network problems seems to occur when using the system `nuget` (shipped with mono), as opposed to `dotnet restore` (implicit or explicit). This will download the packages we need using `dotnet restore`, and then the `nuget` binary will hopefully not try to look online too much (since both `nuget` and `dotnet restore` will use the same local cache).

Ref: https://github.com/xamarin/maccore/issues/2620
2022-09-27 08:49:54 +02:00
dotnet-maestro[bot] eab2bca993
[main] Update dependencies from dotnet/installer (#15424)
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.AspNetCore.App.Ref**: from 6.0.5 to 6.0.9 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer
- **Subscription**: be6e1947-9e64-4217-c50e-08da52a3899f
- **Build**: 20220915.1
- **Date Produced**: September 15, 2022 7:51:35 AM UTC
- **Commit**: 1c38151cabb5771a1503aff6e5cecb435be4c69c
- **Branch**: refs/heads/release/6.0.4xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 6.0.301-rtm.22280.1 to 6.0.402-servicing.22465.1][147]
  - **Microsoft.AspNetCore.App.Ref**: [from 6.0.5 to 6.0.9][148]

[147]: 283e9cf...1c38151
[148]: https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore/branches?baseVersion=GCe5f183b&targetVersion=GC3fe12b9&_a=files

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-09-19 11:38:44 +02:00
dotnet-maestro[bot] 7f9fefce4a
[net7.0] Update dependencies from dotnet/installer (#15889)
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 7.0.100-1.22423.4 to 7.0.100-1.22452.1 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 7.0.0-rc.2.22426.4 to 7.0.0-rc.2.22452.11 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer
- **Subscription**: fa8142cc-91f4-4845-3384-08da5a845ad2
- **Build**: 20220907.11
- **Date Produced**: September 7, 2022 11:47:04 PM UTC
- **Commit**: 5b138901abdfe8f971b6df0f0593e0dc84b96879
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.100-rc.2.22454.1 to 7.0.100-rc.2.22457.11][4]
  - **Microsoft.NET.ILLink.Tasks**: [from 7.0.100-1.22423.4 to 7.0.100-1.22452.1][5]
  - **Microsoft.AspNetCore.App.Ref**: [from 7.0.0-rc.2.22426.4 to 7.0.0-rc.2.22452.11][6]

[4]: 330dee3...5b13890
[5]: 313671b...5f9bfd9
[6]: 5eff673...59a0a28

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-09-09 10:48:20 +02:00
Rolf Bjarne Kvinge 7858937c33 🪄 2022-09-06 14:41:21 +02:00