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

16114 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 7d24e6dc23
[tests] Fix computing the correct default runtime identifier for Mac Catalyst. (#18709) 2023-08-14 11:58:59 +02:00
dotnet-maestro[bot] aca645d25c
[net8.0] Update dependencies from xamarin/xamarin-macios (#18715)
This pull request updates the following dependencies

## From https://github.com/xamarin/xamarin-macios

- **Subscription**: 34d10fbb-96e7-4139-42ad-08db73ee5f69
- **Build**: 20230812.14
- **Date Produced**: August 12, 2023 6:43:33 PM UTC
- **Commit**: 3dbe4c545c
- **Branch**: refs/heads/release/7.0.3xx

- **Updates**:
  - **Microsoft.iOS.Sdk**: [from 16.4.7090 to 16.4.7097][16]

[16]: 43ae6c7494...3dbe4c545c
2023-08-14 11:58:32 +02:00
Rolf Bjarne Kvinge c1f56a0dcd
[net8.0] Fix merge conflict resolution failure in the xharness dependency. (#18687) 2023-08-10 16:36:05 +02:00
Rolf Bjarne Kvinge da2cc0375f
[net8.0] Merge main into net8.0. (#18676) 2023-08-10 07:35:43 +02:00
Rolf Bjarne Kvinge 5ec6aa23b5 [net8.0] Merge main into net8.0. 2023-08-09 14:15:42 +02:00
dotnet-maestro[bot] 571cd45627
[main] Update dependencies from dotnet/xharness (#18647)
This pull request updates the following dependencies

## From https://github.com/dotnet/xharness

- **Subscription**: 601bc5e1-1cae-44b5-cf5f-08db9342aa2f
- **Build**: 20230803.1
- **Date Produced**: August 3, 2023 5:57:37 PM UTC
- **Commit**: 7e3f2975a8767cd416594d7194ba617f6ef8e88e
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.DotNet.XHarness.iOS.Shared**: [from 8.0.0-prerelease.23401.3 to 8.0.0-prerelease.23403.1][1]

[1]: c1216531b6...7e3f2975a8
2023-08-09 14:07:05 +02:00
Rolf Bjarne Kvinge 0c602c1f88
Revert "[net8.0] Disable legacy Xamarin. (#18438)" (#18616)
This reverts commit 50bc75bdb6.
2023-08-09 10:34:00 +02:00
Rolf Bjarne Kvinge 58203da507
[net8.0] Merge main into net8.0. (#18663) 2023-08-09 10:23:54 +02:00
Rolf Bjarne Kvinge 092e2ba28f
[msbuild] Don't try to run 'dotnet build' if 'dotnet restore' failed in the XamarinBuild task. (#18620)
This avoids throwing spurious exceptions when we blinding keep executing
stuff that doesn't make sense anymore.
2023-08-09 10:18:22 +02:00
Rolf Bjarne Kvinge 0590d65456
[devops] Remove option to disable .NET from CI. (#18650)
It's rather rare now that we need to disable .NET from the CI, so just
remove the option. It can still be disabled directly in the code when
needed.

Also this fixes an issue where we'd build with .NET enabled even if
disabled in the code, because we'd always pass --enable-dotnet to
configure.
2023-08-08 17:34:19 +02:00
Rolf Bjarne Kvinge 294bc1db9a
[GitOps] Ignore any comments by msftbot. (#18661)
Otherwise we might end up with a bot fight:

https://github.com/xamarin/xamarin-macios/issues/18598#issuecomment-1669416345
2023-08-08 17:02:58 +02:00
Rolf Bjarne Kvinge a3e2d48335 [net8.0] Merge main into net8.0. 2023-08-08 16:06:04 +02:00
Rolf Bjarne Kvinge ee75298eb3
[net8.0] Merge main into net8.0. (#18659) 2023-08-08 15:42:44 +02:00
Manuel de la Pena 716e8baf63
[Generator] Ensure that selectors fields do not have overlapping names. Fixes #18645 (#18646) 2023-08-08 09:25:21 -04:00
Rolf Bjarne Kvinge 970a00e8ce
[mlaunch] Bump to a version that works with Xcode 15. (#18651) 2023-08-08 08:32:02 +02:00
Rolf Bjarne Kvinge bb15916902
[bgen] Use a response file when compiling code. (#18512)
This way we don't run into limitations on the command-line length.
2023-08-08 08:29: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 58b5d14d8c [net8.0] Merge main into net8.0. 2023-08-07 20:21:34 +02:00
Rolf Bjarne Kvinge b17626ff1c
[msbuild] Re-aot referencing assemblies. Fixes #17708. (#18509)
If an assembly changes, then we must AOT compile that assembly again (which we already
did), in addition to any assembly that references the modified assembly (which we
didn't do).

So rework the AOTCompile target: remove the Inputs and Outputs (because the dependency
tracking is too complicated for MSBuild to resolve), and instead move the logic to
detect if an assembly must be AOT-compiled again into the AOTCompile task.

Note that this PR has a custom port to .NET 8: #18518.

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

---------

Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-08-07 20:19:30 +02:00
Rolf Bjarne Kvinge 64077229cb
[net8.0] [msbuild] Re-aot referencing assemblies. Fixes #17708. (#18518)
If an assembly changes, then we must AOT compile that assembly again (which we already
did), in addition to any assembly that references the modified assembly (which we
didn't do).

So rework the AOTCompile target: remove the Inputs and Outputs (because the dependency
tracking is too complicated for MSBuild to resolve), and instead move the logic to
detect if an assembly must be AOT-compiled again into the AOTCompile task.

This is a port of the [original fix for main][1] to .NET 8, where we have to
take the dedup assembly into account too: if any assembly has changed, then we
must re-aot the dedup assembly as well.

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

[1]: https://github.com/xamarin/xamarin-macios/pull/18509

---------

Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-08-07 20:19:08 +02:00
Rolf Bjarne Kvinge 6431e88772
[configure] Make 'macos' work like 'mac'. (#18627)
I can never remember which one is the right one, so just make them both
work.
2023-08-07 19:19:37 +02:00
Rolf Bjarne Kvinge a33c80d6c7
[net8.0] Change the default RuntimeIdentifier. (#18495)
* When publishing a mobile app, choose a device architecture (as opposed
  to showing an error if none was specified by the developer)
* When building for the simulator, choose the arm64 runtime identifier
  if we're running on an arm64 machine.
* When building a Debug build for desktop, choose the arm64 runtime
  identifier if we're running on an arm64 machine.

Fixes https://github.com/xamarin/xamarin-macios/issues/18455.
Fixes https://github.com/xamarin/xamarin-macios/issues/16152.
Fixes https://github.com/xamarin/xamarin-macios/issues/17841.

Section in the release notes: https://github.com/xamarin/xamarin-macios/wiki/.NET-8-release-notes#default-runtimeidentifiers

---------

Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-08-07 17:51:37 +02:00
Šimon Rozsíval 14f75f06dc
MSR: Generate additional constructors to reduce usage of reflection (#18529)
Closes #18357

This PR implements the idea described in the linked issue:

Whenever there's an NSObject constructor that we call from a registrar
callback, we need to create
a separate constructor that will first set the `handle` and `flags`
values of the NSObject before
calling the original constructor. Here's an example of the code we
generate:

```csharp
// The original constructor:
public .ctor (T0 p0, T1 p1, ...) { /* ... */ }

// The generated constructor with pre-initialization: 
public .ctor (T0 p0, T1 p1, ..., IntPtr handle, IManagedRegistrar dummy) {
    this.handle = (NativeHandle)handle;
    this.flags = 2; // Flags.NativeRef == 2
    this..ctor (p0, p1, ...);
}
```

- This code can't be expressed in C# and it can only be expressed
directly in IL.
- The reason we need to do this is because the base NSObject
parameterless constructor
  would allocate a new Objective-C object if `handle` is a zero pointer.
- The `IManagedRegistrar` type is added only to make the constructor
signature unique (IManagedRegistrar is not a public class and customers
can't use it in their apps directly)
2023-08-07 15:41:07 +02:00
Rolf Bjarne Kvinge 1e7e084fd1
[tests] If listing included platforms for .NET, don't include anything if .NET isn't enabled. (#18637) 2023-08-07 15:39:42 +02:00
Rolf Bjarne Kvinge d9150f63ea
[net8.0] Merge main into net8.0. (#18636) 2023-08-07 15:39:05 +02:00
Ivan Povazan 0c0e5d799a
Set `DynamicCodeSupport=false` to enable trimming in full AOT mode (#18555)
Fixes https://github.com/xamarin/xamarin-macios/issues/18340
2023-08-07 10:59:42 +02:00
Rolf Bjarne Kvinge b13d2b77a1 Fix merge conflict resolution failure. 2023-08-04 16:06:44 +02:00
Rolf Bjarne Kvinge 2a3dc56463
[HealthKit] Add nullability attributes to HKSampleQueryResultsHandler. Fixes #18622. (#18630)
Fixes https://github.com/xamarin/xamarin-macios/issues/18622.
2023-08-04 15:42:47 +02:00
Rolf Bjarne Kvinge 729c403704 [net8.0] Merge main into net8.0. 2023-08-04 14:28:12 +02:00
Ivan Povazan 2918781812 Merge remote-tracking branch 'upstream/net8.0' into feature-switch-disable-dynamic-code 2023-08-04 10:20:55 +02:00
Manuel de la Pena 2b84e260e1
[UIKit] Fix UIKit static method on TvOS (#18623)
This API was missed because the old sim intro tests are not running and
we missed it. This was found while working on xcode15. The tvOS attr is
missing which defaults to the min version of tvOS when it should be 15.

Added a compat implementation so that the API remains that will return
null.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-08-03 14:50:08 -04:00
Rolf Bjarne Kvinge 5ea3eb3592
[tools] Don't link with NewsstandKit if we're using Xcode 15+. (#18626)
Apple completely removed the NewsstandKit framework in Xode 15.

This effectively adds basic support for using Xcode 15 with .NET 7.

While this technically won't be a supported scenario, we have tests that
ensures .NET 7 apps can be built with .NET 8, and .NET 8 will ship with Xcode
15 support. This means that in order to make these tests work, we'll otherwise
have to have Xcode 14.3 installed both locally and on bots (in addition to
Xcode 15 of course), which is a rather big nightmare.

It's much easier to must try to make Xcode 15 work with .NET 7.
2023-08-03 16:10:16 +02:00
Ivan Povazan 15c35b4366
Inlcude maccatalyst when specifying DynamicCodeSupport=false, exclude watchOS as it is not supported on dotnet
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-08-03 10:55:44 +02:00
Rolf Bjarne Kvinge 82a5174643
[tools] Always link weakly with NewsstandKit. Fixes #18606. (#18621)
It seems that Apple will completely remove the NewsstandKit framework from iOS 17.

This poses a problem for existing apps that link with NewsstandKit: they will
crash at launch.

Solve this by always linking weakly with the NewsstandKit framework; this way
any apps that link with it will keep working if the framework ends up being
removed by Apple.

Fixes https://github.com/xamarin/xamarin-macios/issues/18606.
Fixes https://github.com/dotnet/maui/issues/16316.
2023-08-03 08:28:00 +02:00
Manuel de la Pena efd020c6c6
[UIKit] Fix UIKit selector on TvOS (#18617)
This API was missed because the old sim intro tests are not running and
we missed it. This was found while working on xcode15. The tvOS attr is
missing which defaults to the min version of tvOS when it should be 15.

Added a compat implementation so that the API remains.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-08-02 14:24:43 -04:00
Manuel de la Pena e4ed7e18bf
[Introspection] Fix intro skip when the properties are internal. (#18613) 2023-08-02 07:46:45 -04:00
Alexander Köplinger bfb8665d19
Convert XHarness.Tests from packages.config to PackageReference and add darc dependency (#18611)
Also needed a few tweaks to fix build errors that were introduced
recently.

---------

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2023-08-02 13:39:33 +02:00
Rolf Bjarne Kvinge 08b293760a
[StoreKit] Add a default SKCloudServiceController constructor. Fixes #18577. (#18608)
Using the default constructor is the doumented way to create an instance
of an SKCloudServiceController.

Fixes https://github.com/xamarin/xamarin-macios/issues/18577.
2023-08-02 12:56:41 +02:00
Rolf Bjarne Kvinge 26b46ed035
[net8.0] Merge main into net8.0. (#18609) 2023-08-02 11:12:25 +02:00
Peter Collins 72811eb753
[ci] Run Codesign Verification after MSI creation (#18603)
The `MicroBuildCodesignVerify@3` task has been added to validate the
signing status of the MSI files required for VS insertions. This will
allow us to identify any potential signing issues earlier.
2023-08-01 23:53:20 -04:00
Manuel de la Pena c4c95b368b
[Tests] Use the correct nuget version on CI (#18610)
Similar to PR https://github.com/xamarin/xamarin-macios/pull/18600 we
need to use the same verison as the one found in the workload file in CI
and not that one from the make.config.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-08-01 23:51:19 -04:00
Rolf Bjarne Kvinge 34667ebce6 [net8.0] Merge main into net8.0. 2023-08-01 17:10:44 +02:00
microsoft-github-policy-service[bot] 4e4d564ae2
FabricBot: Onboarding to GitOps.ResourceManagement because of FabricBot decommissioning (#18541)
Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagement
as FabricBot replacement

Owners of the FabricBot configuration should have received email
notification. The same information contained in the email is published
internally at: https://aka.ms/gim/fabricbot. Details on the replacement
service and the syntax of the new yaml configuration file is available
publicly at: https://microsoft.github.io/GitOps/policies/resource-management.html
2023-08-01 17:07:37 +02:00
Filip Navara 53ff85f67c
[NativeAOT] Remove IlcKeepManagedDebuggerSupport workaround (#18515)
Fixes #18478

Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-08-01 16:05:35 +02:00
dotnet-maestro[bot] 2ce9e44f73
[net8.0] Update dependencies from dotnet/installer (#18601)
This pull request updates the following dependencies

[marker]: <> (Begin:f9b68d84-9c90-4bd0-5499-08db4112d57e)
## From https://github.com/dotnet/installer
- **Subscription**: f9b68d84-9c90-4bd0-5499-08db4112d57e
- **Build**: 20230728.5
- **Date Produced**: July 29, 2023 2:39:39 AM UTC
- **Commit**: eee48b8da517110dcdcd100c1a36bb084abd4482
- **Branch**: refs/heads/main

[DependencyUpdate]: <> (Begin)

- **Updates**:
- **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-rc.1.23377.5 to
8.0.100-rc.1.23378.5][2]

[2]: 0759df6ebb...eee48b8da5

[DependencyUpdate]: <> (End)


[marker]: <> (End:f9b68d84-9c90-4bd0-5499-08db4112d57e)

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
2023-07-30 15:26:10 -04:00
Manuel de la Pena c129b7269a
[Xharness] Fix path to mlaunch when using mlaunch from a .NET SDK pack on CI. (#18600)
This commit fixes the code that was added in
https://github.com/xamarin/xamarin-macios/pull/16361.

The previous change uses the version number that is part of the config
file in the current build machine. That is correct when we are working
when we are running the tests in the same machine that built them. That
IS NOT THE CASE when building on CI.

Back when the CI did the separation to accommodate the EO we noticed
that if the workload is built in a diff machine, the versions were not
to be trusted, that is why the CI sets and enviroment variable to track
the version that was built in the original step. This change check if we
are on the CI, if we are we trust the version given by the previos
machine, else we use the config one.
2023-07-30 11:52:02 -04:00
Manuel de la Pena 6b1f9699ac
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 8130882 (#18574)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2023-07-28 16:31:58 -04:00
dotnet-maestro[bot] 661cb88f63
[net8.0] Update dependencies from dotnet/installer (#18599)
This pull request updates the following dependencies

[marker]: <> (Begin:Coherency Updates)
## 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)

[DependencyUpdate]: <> (Begin)

- **Coherency Updates**:
- **Microsoft.NET.ILLink.Tasks**: from 8.0.0-rc.1.23375.3 to
8.0.0-rc.1.23376.5 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.AspNetCore.App.Ref**: from 8.0.0-rc.1.23375.2 to
8.0.0-rc.1.23376.5 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.NETCore.App.Ref**: from 8.0.0-rc.1.23375.3 to
8.0.0-rc.1.23376.5 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.NETCore.App.Ref**: from 8.0.0-rc.1.23375.3 to
8.0.0-rc.1.23376.5 (parent: Microsoft.Dotnet.Sdk.Internal)

[DependencyUpdate]: <> (End)

[marker]: <> (End:Coherency Updates)

[marker]: <> (Begin:f9b68d84-9c90-4bd0-5499-08db4112d57e)
## From https://github.com/dotnet/installer
- **Subscription**: f9b68d84-9c90-4bd0-5499-08db4112d57e
- **Build**: 20230727.5
- **Date Produced**: July 28, 2023 12:24:33 AM UTC
- **Commit**: 0759df6ebb8c02d185fe45adfa58069ac97ebdee
- **Branch**: refs/heads/main

[DependencyUpdate]: <> (Begin)

- **Updates**:
- **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-rc.1.23375.11 to
8.0.100-rc.1.23377.5][1]
- **Microsoft.NET.ILLink.Tasks**: [from 8.0.0-rc.1.23375.3 to
8.0.0-rc.1.23376.5][2]
- **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-rc.1.23375.2 to
8.0.0-rc.1.23376.5][3]
- **Microsoft.NETCore.App.Ref**: [from 8.0.0-rc.1.23375.3 to
8.0.0-rc.1.23376.5][2]
- **Microsoft.NETCore.App.Ref**: [from 8.0.0-rc.1.23375.3 to
8.0.0-rc.1.23376.5][2]

[1]: f07981240e...0759df6ebb
[2]: 3dd73e6d53...ea97babd7c
[3]:
f2d2ba09c6...40dc1466a4

[DependencyUpdate]: <> (End)


[marker]: <> (End:f9b68d84-9c90-4bd0-5499-08db4112d57e)

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
2023-07-28 13:21:26 -04:00
Manuel de la Pena 78f8985ac5
Update tests/xharness/Harness.cs 2023-07-28 12:50:37 -04:00
Manuel de la Pena a4972fd1bd Merge branch 'fix-mlaunch-location' of github.com:mandel-macaque/xamarin-macios into fix-mlaunch-location 2023-07-28 12:48:45 -04:00