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

14715 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 2a4eaea5a7
[tests] Enable tests for interfaces being linked away. Fixes #9566. (#16279)
Fixes https://github.com/xamarin/xamarin-macios/issues/9566.
2022-10-07 13:10:03 +02:00
dotnet-maestro[bot] ec467c647b
[main] Update dependencies from dotnet/installer (#16272)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: be6e1947-9e64-4217-c50e-08da52a3899f
- **Build**: 20221005.14
- **Date Produced**: October 5, 2022 11:18:08 PM UTC
- **Commit**: 06b150f71677399fe0a5cc3382b0aa7c3f3d9600
- **Branch**: refs/heads/release/6.0.4xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 6.0.403-servicing.22504.9 to 6.0.403-servicing.22505.14][1]

[1]: 9d74946...06b150f

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
2022-10-07 08:22:34 +02:00
Mauro Agnoletti 6bc66bf2ee
Ensure we restore the temp csproj to compute AOT compiler path (#16280)
The build command doesn't support a parameter to specify a NuGet.config, so we need to restore the temp project first, so we pass the NuGet.config file to use the sources from, in case it exists (e.g: the NuGet.config from the XMA dotnet path).

This is useful to support auhtorized NuGet feeds

Fixes Bug #1611102 - [XVS][MAUI] Failed to build .NET MAUI (net6.0) with iOS Simulator: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1611102

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-10-07 08:16:01 +02:00
Rolf Bjarne Kvinge 9248e37698
[actions] Set a git identity when updating single platform release branches. (#16256) 2022-10-07 08:06:07 +02:00
Rolf Bjarne Kvinge fa778b50e8
[autoformat] Add the DotNetUnitTests project to the projects to autoformat. (#16257) 2022-10-07 08:05:53 +02:00
Rolf Bjarne Kvinge 8bb8d1aa76
Update DOWNLOADS.md with new releases. (#16258)
Also fix the script that computes DOWNLOADS.md to actually use the correct
DOWNLOADS.md location.
2022-10-07 08:05:15 +02:00
Rolf Bjarne Kvinge 85292582ec
[dotnet] Add helpful make targets to implement and test templates (#16261) 2022-10-07 08:04:26 +02:00
Rolf Bjarne Kvinge d73f2f8fea
Merge main into net7.0. (#16268) 2022-10-07 07:52:44 +02:00
Israel Soto 8e91385882
[TVServices] Added support for Xcode 14.1 b3 (#16194)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-06 17:21:10 -04:00
Israel Soto c54a957c8b
[CoreSpotlight] Added support for Xcode 14.1 b1 (#16116)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-06 13:44:36 -04:00
Israel Soto 4e765eca0b
[NetworkExtension] Added support for Xcode 14.1 b1 (#16066)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-06 12:16:12 -04:00
Chris Hamons 83ed66e7d6
[generator] Use new ObsoletedOSPlatformAttribute for generated code (#15941)
- Part of https://github.com/xamarin/xamarin-macios/issues/15849
- A bit of dead code was removed while I was reviewing things.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-10-06 11:15:51 -05:00
Rolf Bjarne Kvinge 6d6c3b8570
[dotnet] Add class library project templates for tvOS, macOS and Mac Catalyst. (#16263)
These new project templates won't show up in VSMac until the new templates are
added to VSMac.

Ref: 61afbd1cd1/Xamarin.Addins.Core/Xamarin.Ide.Templating/TemplateDescriptionProvider.cs (L207-L216)

Also update the corresponding template tests.

This PR might be easier to review commit-by-commit due to the large number of generated localization files.
2022-10-06 16:47:06 +02:00
Rolf Bjarne Kvinge 6afa8eaeae
[dotnet] macOS is not a mobile platform, so don't claim it is in the templates. (#16262) 2022-10-06 16:46:27 +02:00
Rolf Bjarne Kvinge ec2390ad6c
[dotnet] Improve name and descripting in a few existing templates a little bit. (#16260)
This increases the consistency with how other templates are named.
2022-10-06 15:50:33 +02:00
Rolf Bjarne Kvinge fb97063227 Merge main into net7.0. 2022-10-06 14:01:27 +02:00
Rolf Bjarne Kvinge 45b97d838e Merge main into xcode14.1. 2022-10-06 13:59:29 +02:00
Rolf Bjarne Kvinge 273c2fa51a
[Foundation] Add NSArray.ToArray and implement IEnumerable<NSObject>. (#16252)
For NSArray, implement:

* A ToArray () method that returns an NSArray[].
* A ToArray<T> () method that returns a T[].
* The IEnumerable<NSObject> interface.

For NSArray<T>, implement:

* A ToArray () method that returns a T[].

This should make NSArray much better to work with from managed code.
2022-10-06 08:37:02 +02:00
Rolf Bjarne Kvinge f22ecb5f05
[autoformat] Add xtro projects to the projects to autoformat. (#16239) 2022-10-06 07:30:47 +02:00
Rolf Bjarne Kvinge 48684c2285
[actions] Checkout all branches when updating single platform release branches. (#16254)
Because we want to update branches other than main.
2022-10-06 07:29:47 +02:00
Rolf Bjarne Kvinge ff2b0a02c2
[actions] Allow manual triggers in the update single platform branch action. (#16251) 2022-10-05 21:15:03 +02:00
dotnet-maestro[bot] e98e0cbb94
[main] Update dependencies from dotnet/installer (#16246)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: be6e1947-9e64-4217-c50e-08da52a3899f
- **Build**: 20221004.9
- **Date Produced**: October 4, 2022 7:14:06 PM UTC
- **Commit**: 9d749467a5fb8fdc76c0ec90b3a7a6388dc3ca2c
- **Branch**: refs/heads/release/6.0.4xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 6.0.402-servicing.22465.1 to 6.0.403-servicing.22504.9][1]

[1]: 1c38151...9d74946

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
2022-10-05 21:12:41 +02:00
Rolf Bjarne Kvinge 76c0ed947e
[actions] Update the single-platform test branch every Saturday. (#16243)
We have four branches that test releasing a single platform:

    release/release-test-only-dotnet-$platform

In these branches, only the given platform is enabled (these are also
.NET-only branches), with the idea that we're testing the build and publish of
a single platform. These branches have a 'release/' prefix, so that the go
through as much as possible of our release pipeline.

Hopefully by testing and making sure the following builds and publishes correctly:

* All platforms (the default for our build)
* Each platform by itself

Building and publishing more than one (but less than all four) platforms also
work.

This PR will automatically update these four branches from main every
Saturday, so that we'll be able to find and fix any problems that occur before
release date.
2022-10-05 18:11:52 +02:00
Rolf Bjarne Kvinge 890c9b7ba6
[autoformat] Update to cope with breaking changes in actions/github-script. (#16240)
actions/github-script was recently updated from 3.1.0 to 6.3.1 (69de14c668), but unfortunately there were breaking changes:

* https://github.com/actions/github-script#breaking-changes
* https://github.com/actions/github-script/issues/242#issuecomment-1049167283

This would manifest as:

    TypeError: Cannot read properties of undefined (reading 'listWorkflowRunArtifacts')
    Error: Unhandled error: TypeError: Cannot read properties of undefined (reading 'listWorkflowRunArtifacts')
        at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:13340:16), <anonymous>:3:38)
        at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:13341:12)
        at main (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:13436:26)
        at Module.858 (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:13413:1)
        at __webpack_require__ (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:24:31)
        at startup (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:43:19)
        at /home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:49:18
        at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v6.3.1/dist/index.js:52:10)
        at Module._compile (node:internal/modules/cjs/loader:1101:14)
        at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)

So update our code to to use the new way to do things.
2022-10-05 18:11:21 +02:00
Israel Soto c019630352
[WatchKit] Added support for Xcode 14.1 b1 (#16061)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-05 11:39:28 -04:00
Israel Soto 66ae01a3b2
[StoreKit] Added support for Xcode 14.1 b1-b3 (#16026)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-10-05 11:37:09 -04:00
Rolf Bjarne Kvinge 14245bd13f
[release] Only try to copy files to the package directory if they exist. (#16225)
This is important when not building all platforms, because not all types of
files are produced for every platform.
2022-10-05 08:59:52 +02:00
Rolf Bjarne Kvinge e2c41bb90f
Merge main into xcode14.1. (#16234) 2022-10-05 08:52:19 +02:00
Rolf Bjarne Kvinge d8b991e0e6
Merge main into net7.0. (#16233) 2022-10-05 08:45:10 +02:00
Rolf Bjarne Kvinge 71657cfe83
Disable objc_msgSend stubs in clang. Fixes #16223. (#16231)
Clang will by default emit objc_msgSend stubs in Xcode 14, which ld from
earlier Xcodes doesn't understand. We disable this by passing
-fno-objc-msgsend-selector-stubs to clang.

Ref: https://developer.apple.com/videos/play/wwdc2022/110363/
Ref: https://www.wwdcnotes.com/notes/wwdc22/110363/
Ref: https://github.com/llvm/llvm-project/issues/56034

Fixes https://github.com/xamarin/xamarin-macios/issues/16223.
2022-10-05 08:43:24 +02:00
Rolf Bjarne Kvinge 96d7b958b6
[msbuild] Fix processing static libraries in binding sidecars. (#16227)
Fixes an issue where we'd end up trying to link with the managed assembly instead:

> ld: warning: ignoring file .../bin/Debug/net6.0-ios/MyBinding.dll, building for iOS Simulator-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x4D 0x5A 0x90 0x00 0x03 0x00 0x00 0x00 0x04 0x00 0x00 0x00 0xFF 0xFF 0x00 0x00 )

Also add a warning if we run into other types of libraries in the future to
make it easier to diagnose.
2022-10-05 08:40:20 +02:00
Manuel de la Pena ee1855b887
[DevOps] Split the signing of legacy pkgs and dotnet pkgs. (#16183)
This change splits the signing of the pkgs so that we can have botnet
pkgs as early as possible without needing to wait for the legacy ones to
be completed, this will allow to do VS insertions earlier.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-10-04 16:46:38 -04:00
Rolf Bjarne Kvinge c7badeacf1 Merge main into xcode14.1. 2022-10-04 16:21:54 +02:00
Rolf Bjarne Kvinge 651acc9ec5 Merge main into net7.0. 2022-10-04 16:21:28 +02:00
Rolf Bjarne Kvinge ecae99a082
Merge main into xcode14.1. (#16179) 2022-10-04 16:20:58 +02:00
dependabot[bot] 69de14c668
Bump actions/github-script from 3.1.0 to 6.3.1 (#16218)
Bumps [actions/github-script](https://github.com/actions/github-script) from 3.1.0 to 6.3.1.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-04 14:23:33 +02:00
Rolf Bjarne Kvinge 0991fae971
[net7.0] [devops] Don't fail building nugets if we dno't have files of every possible extension. (#16221)
Depending on the enabled platforms, we might not have files with all the listed extensions.
2022-10-04 08:17:03 +02:00
Rolf Bjarne Kvinge b0e99f8c26 Fix merge failure. 2022-10-04 08:13:46 +02:00
Rolf Bjarne Kvinge fd2ee69c2b Merge remote-tracking branch 'origin/xcode14.1' into bump-main-in-xcode14.1-2022-09-28 2022-10-03 22:28:13 +02:00
Rolf Bjarne Kvinge d4e6d4a3c2
[tools] Always weak link the SensorKit framework. Fixes #9938. (#16215)
The SensorKit framework isn't available on all devices (for instance iPads),
and as such we can't link with it strongly.

This seems to be a bug in Apple's toolchain, because Xcode runs into the same
problem if you try to use an app referencing SensorKit on an iPad.

Fixes https://github.com/xamarin/xamarin-macios/issues/9938.
2022-10-03 22:19:02 +02:00
Rolf Bjarne Kvinge 4046acc3d0
[autoformat] Extract some logic into its own script file. (#16200)
We have some problems when autoformatting PRs and the PR branch isn't fully
up-to-date with regards to the target branch.

I believe this is what happens:

1. When a PR is created (or modified), GitHub Actions will merge the PR branch
   with the target branch, and parse/load the merged *.yml files.
2. Then when we run the autoformatter, we're working on the tip of the PR
   branch (and not the merged result).
3. This means that we were using the list of projects to autoformat from the
   merged branch, but exeuting on the PR branch. This resulted in spurious
   autoformatting, because the autoformatted would autoformat more code than
   expected.

The fix I'm implementing is to move the list of projects to autoformat to a
separate script in source code. That way we'll work upon the list of projects
as they show up in the PR branch, and not the merged results.
2022-10-03 22:18:28 +02:00
Rolf Bjarne Kvinge 5078c8b065
[AVFoundation] Fix the AVAudioFormat.StreamDescription binding. Fixes #8892. (#16206)
The property returns a pointer to a struct, not the struct itself.

Fixes https://github.com/xamarin/xamarin-macios/issues/8892.
2022-10-03 22:18:07 +02:00
Rolf Bjarne Kvinge 2cb15e1608
[devops] Make absolutely sure there are no artifacts around from previous builds. (#16207) 2022-10-03 22:17:07 +02:00
VS MobileTools Engineering Service 2 78550909a1
[xcode14.1] [ShareWithYou] Fix linker problem due to a bad yy. Fixes #16084 (#16187)
Fixes https://github.com/xamarin/xamarin-macios/issues/16084

Backport of #16137

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-03 12:10:31 -04:00
Alex Soto 27e6958b0a
[xcode14.1] Bump to Xcode 14.1 Beta 3 (#16010)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-10-03 17:24:41 +02:00
dotnet-maestro[bot] 51fcb2ec4f
[net7.0] Update dependencies from dotnet/runtime (#16211)
This pull request updates the following dependencies

## From https://github.com/dotnet/runtime
- **Subscription**: ac2a34ec-35b7-4b1f-1bd1-08da8b948864
- **Build**: 20220930.10
- **Date Produced**: October 1, 2022 5:49:58 AM UTC
- **Commit**: 809b42196ea09700175785a25eace264995dde75
- **Branch**: refs/heads/release/7.0

- **Updates**:
  - **Microsoft.NETCore.App.Ref**: [from 7.0.0-rtm.22478.9 to 7.0.0-rtm.22480.10][2]

[2]: 3fed4a3...809b421

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2022-10-03 12:15:05 +02:00
Rolf Bjarne Kvinge 71c62c25b6
[UIKit] Change UITextInput.SelectedTextRange to not be ArgumentSemantic.Copy. Fixes #15677. (#16201)
When a property is declared as ArgumentSemantic.Copy, we'll copy the
input value in property setters.

Unfortunately this makes UIKit crash, because for
UITextField.SelectedTextRange UIKit might use a custom UITextRange
subclass,
with a broken 'copy' implementation (doesn't copy all the fields), that
subsequently makes the app crash.

On the other hand, UITextRange doesn't conform to NSCopying, and as such
is in
theory not necessarily copyable, and thus I believe the bug is really
that the
property is declared as a 'copy' property.

Fixes https://github.com/xamarin/xamarin-macios/issues/15677.
2022-10-03 12:13:19 +02:00
Rolf Bjarne Kvinge 7e6edcbc36
[Network] Fix a few issues with the callbacks in NWPath. Fixes #13772. (#16138)
* Change EnumerateGateways to use the 'static_EnumerateGatewaysHandler'
  callback. It looks like this was a c&p error, since the
  'static_EnumerateGatewaysHandler' callback was implemented, just never
  referenced anywhere.
* Add an overload to EnumerateGateways and EnumerateInterfaces that takes a
  callback that returns a bool indicating whether the enumeration should
  continue. This mirrors the native API.
* Obsolete the EnumerateGateways and EnumerateInterfaces overloads that take a
  void callback (and remove in XAMCORE_5_0).
* Add a test for EnumerateGateways that works (the previous failed, but never
  asserted the failure, so it would just silently time out).

Fixes https://github.com/xamarin/xamarin-macios/issues/13772.
2022-10-03 12:11:52 +02:00
dotnet-maestro[bot] cb89675cec
[net7.0] Update dependencies from dotnet/installer (#16205)
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 7.0.0-rtm.22477.1 to 7.0.0-rtm.22479.3 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer
- **Subscription**: fa8142cc-91f4-4845-3384-08da5a845ad2
- **Build**: 20220929.5
- **Date Produced**: September 30, 2022 2:50:41 AM UTC
- **Commit**: eb23d8cf9a11fd44bf8b07adf508bac6a9eae423
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.100-rtm.22478.24 to 7.0.100-rtm.22479.5][1]
  - **Microsoft.AspNetCore.App.Ref**: [from 7.0.0-rtm.22477.1 to 7.0.0-rtm.22479.3][2]

[1]: 8153d0b...eb23d8c
[2]: 931abe3...02d62cf
2022-09-30 20:44:13 +02:00
Rolf Bjarne Kvinge 32c8ffdbb8
Merge main into net7.0. (#16203) 2022-09-30 20:43:22 +02:00