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

15532 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge e997b049c3
[actions] Switch to using the autoformat actions instead of inline logic. (#17620)
This adds some extra testing to the actions and also makes sure we get any
updates.
2023-02-27 09:49:47 +01:00
Rolf Bjarne Kvinge e0c92a03ce
[dotnet] Include the marshal-ilgen component. Fixes #16836. (#17606)
Fixes https://github.com/xamarin/xamarin-macios/issues/16836.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1751368.
2023-02-24 20:01:43 +01:00
Rolf Bjarne Kvinge cfee729c01
[ImageIO] We don't typically own input parameters. (#17613)
We don't typically own input parameters, so make sure to pass 'false' for the
'owns' parameter to Runtime.GetNSObject.

This fixes a crash due to overreleasing these objects.

Also make the block creation code optimizable.
2023-02-24 19:55:12 +01:00
Mauro Agnoletti b37c043a69
[net8] Fix ILLink for net8 remote builds (#17600)
From net8, ILLink is not part of dotnet/sdk anymore but part of dotnet/runtime: https://github.com/dotnet/runtime/tree/main/src/tools/illink/src/ILLink.Tasks

This means that now it's a NuGet package called `Microsoft.NET.ILLink.Tasks` and it's installed as part of the dotnet SDK installation

This affects the remote builds since we were looking on the dotnet SDK installation folder used by XMA (/Library/Caches/Xamarin/XMA/SDKs/dotnet) to find the 'illink.dll' assembly, but now that file is located in the NuGet packages folder used by XMA (/Library/Caches/Xamarin/XMA/SDKs/.home).

This change consists of adding some new MSBuild properties to calculate the right path of the 'illink.dll' assembly depending on if it's included in the SDK or not

This should fix Bug #1748997 - [XVS][.NET 8] Build failed with two errors when Target Framework is net8.0-ios: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1748997
2023-02-24 13:54:36 +01:00
Rolf Bjarne Kvinge ee5d176bfc
[src] Make BlockLiteral disposable and update usage accordingly. (#17597)
* Make BlockLiteral disposable.

    This also means to modify the cleanup logic so that it's safe to call
    Dispose more than once.

* Create a helper class to create a block for a simple Action delegate.

    This allows us to simplify a good chunk of code.

* Update all block creation to use the new block API, where blocks are
  disposable. This makes the code pattern a lot simpler.

    I've changed all the P/Invokes to use an unsafe 'BlockLiteral*' pointer,
    because 'using' variables can't be passed as ref arguments, so the choice
    was either to make the parameter type 'IntPtr' and cast away the pointer:

        using var block = new BlockLiteral ();
        PInvoke ((IntPtr) &block);

    or make the parameter an unsafe 'BlockLiteral*' pointer:

        unsafe {
            using var block = new BlockLiteral ();
            PInvoke (&block);
        }

    The upcoming support for function pointers don't have this choice:
    function pointers are always unsafe, so I chose to go the unsafe route
    here as well, since it makes the code simpler once support for function
    pointers has been implemented.

Contributes towards https://github.com/xamarin/xamarin-macios/issues/15783.

This PR might be easier to review commit-by-commit.
2023-02-24 10:28:46 +01:00
Rolf Bjarne Kvinge 46e8ec4ffb
[CoreFoundation] Fix CFStream to use blittable P/Invokes in .NET 8. (#17595)
This turned out a bit more complex than usual, because the delegate we want to
remove from the call to the P/Invoke is a part of the public API.

I worked around this by adding new API that uses the new P/Invoke, and having
the old API throw an exception until we can remove it, but only in .NET 8,
which seems like the earliest we should do this kind of behavioral breaking
change.
2023-02-24 10:20:17 +01:00
dotnet-maestro[bot] 80cdf165e0
[main] Update dependencies from dotnet/installer (#17599)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: 50c9492e-4671-4d1d-7920-08dabd1031a2
- **Build**: 20230222.7
- **Date Produced**: February 22, 2023 8:05:36 PM UTC
- **Commit**: df0fc12896801849d0ad6798f710a78264cb896e
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.104-servicing.23117.20 to 7.0.104-servicing.23122.7][1]
2023-02-24 10:02:18 +01:00
dotnet-maestro[bot] c50c69b122
[net8.0] Update dependencies from xamarin/xamarin-macios (#17598)
This pull request updates the following dependencies

## From https://github.com/xamarin/xamarin-macios
- **Subscription**: 69411ae3-c771-4088-2d6e-08dac814288b
- **Build**: 20230223.2
- **Date Produced**: February 23, 2023 10:33:45 AM UTC
- **Commit**: 9c2af79695
- **Branch**: refs/heads/release/7.0.1xx-xcode14.2

- **Updates**:
  - **Microsoft.MacCatalyst.Sdk**: [from 16.2.1035 to 16.2.1037][4]

[4]: e2529ed...9c2af79
2023-02-24 10:00:09 +01:00
Steve Hawley 1ca9a8fbdf
[dotnet] CGImageMetadata (#17530)
Fixed pinvoke used for CGIMetadata.EnumerateTags
2023-02-23 10:50:58 -05:00
Rolf Bjarne Kvinge c8ca8f401f
[monotouch-test] Fix AUParameterNodeTest to not crash the process in case of asserts on background threads. (#17593) 2023-02-23 14:34:50 +01:00
Rolf Bjarne Kvinge f8f5124a88
[generator] Fix fetching nullability for block properties by checking the property for nullability info. (#17594) 2023-02-23 14:34:20 +01:00
Rolf Bjarne Kvinge a2d9424cf6
Bump mlaunch to get fix for Xcode 14.3 beta 1. (#17586)
Ref: 52cb086032
2023-02-23 09:08:59 +01:00
Rolf Bjarne Kvinge b0c94b48a6
[msbuild] Merge the CollectAssetPack and CollectAssetPacksTaskBase classes. (#17552)
We no longer need two have overridable logic for remote builds, so the
non-abstract task class and the abstract base class can be merged.
2023-02-22 19:09:53 +01:00
Rolf Bjarne Kvinge 8421b4035d
[net8.0] Merge main into net8.0. (#17585) 2023-02-22 19:09:42 +01:00
Manuel de la Pena 0517317ae6
[CI] Add the prefix to the prepare release stage. (#17582) 2023-02-22 11:32:03 -05:00
Manuel de la Pena eb7bcb24f2
[CI] Remove step that is not longer used and is always ignored. (#17583)
We do not longer use it and makes noise in the CI.
2023-02-22 11:31:50 -05:00
Mauro Agnoletti d978d9c404
Updated Xamarin.Messaging to 1.9.40 (#17580)
Applies the following changes from Xamarin.Messaging:

xamarin/Xamarin.Messaging#543

xamarin/Xamarin.Messaging#541

It includes fixes for SSH keys handling, UX improvements when SSH is disabled on the Mac and also when the user is not logged in on the Mac
2023-02-22 10:37:48 +01:00
Marius Ungureanu 12c66ad18b
Use pooled arrays for NSData marshalling (#17578) 2023-02-22 09:05:37 +01:00
Rolf Bjarne Kvinge fec1e8a946 [net8.0] Merge main into net8.0. 2023-02-22 07:05:49 +01:00
Manuel de la Pena 77afb6009b
[CI] Fix yaml paramenter. (#17581) 2023-02-21 14:22:12 -05:00
Manuel de la Pena 4e640a9f40
[CI] Do not skip the insertion but the nuget push. (#17571)
Do not skip the msi conversion since that will be needed in the unified
pipeline BUT skip pushing to the internal nuget feeds.
2023-02-21 14:06:13 -05:00
Rolf Bjarne Kvinge 6f43fe2166
[net8.0] Merge main into net8.0. (#17566) 2023-02-21 17:00:07 +01:00
dotnet-maestro[bot] d30cc612ce
[main] Update dependencies from dotnet/installer (#17564)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: 50c9492e-4671-4d1d-7920-08dabd1031a2
- **Build**: 20230217.20
- **Date Produced**: February 18, 2023 12:32:51 AM UTC
- **Commit**: 15e62a00f494b1d07fde1fe3cca373bb02488cc6
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
- **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.104-servicing.23114.27 to
7.0.104-servicing.23117.20][5]

[5]: 6d3cb5a...15e62a0
2023-02-21 14:57:31 +01:00
Rolf Bjarne Kvinge ad4af52393
[dotnet] Improve error message when someone tries to disable trimming by setting PublishTrimmed=false. (#17568)
Make it more actionable, by telling users what they can do instead.
2023-02-21 14:54:44 +01:00
Manuel de la Pena b462bfde99
[Generator] Move naming logic to its own class and add tests. (#17562)
Naming could be problematic when generating code, move the logic out of
the generator class to a helper class whose only job is to name classes
and keep track of names.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-17 15:33:53 -05:00
Rolf Bjarne Kvinge 7e05ea54bb Merge main into net8.0. 2023-02-17 14:58:12 +01:00
dotnet-maestro[bot] b7b33c5bd7
[net8.0] Update dependencies from xamarin/xamarin-macios (#17563)
This pull request updates the following dependencies

## From https://github.com/xamarin/xamarin-macios
- **Subscription**: 69411ae3-c771-4088-2d6e-08dac814288b
- **Build**: 20230217.2
- **Date Produced**: February 17, 2023 8:36:39 AM UTC
- **Commit**: e2529ed7a2
- **Branch**: refs/heads/release/7.0.1xx-xcode14.2

- **Updates**:
  - **Microsoft.MacCatalyst.Sdk**: [from 16.2.1034 to 16.2.1035][4]
2023-02-17 13:29:04 +01:00
dotnet-maestro[bot] 99277af638
[main] Update dependencies from dotnet/runtime (#17555)
This pull request updates the following dependencies

## From https://github.com/dotnet/runtime
- **Subscription**: 38d2313f-22d5-4062-c8e1-08dabd6d8c77
- **Build**: 20230215.6
- **Date Produced**: February 16, 2023 6:00:46 AM UTC
- **Commit**: b68fd882623b528fd4ef78b122209710f17bacdb
- **Branch**: refs/heads/release/7.0

- **Updates**:
  - **Microsoft.NETCore.App.Ref**: [from 7.0.4 to 7.0.4][1]
2023-02-17 07:29:08 +01:00
Manuel de la Pena 48015145bc
[Generator] Remove a missed warning. (#17558) 2023-02-16 16:51:09 -05:00
Manuel de la Pena a9dbc684ab
[Generator] Make generator.cs smaller by not using nested enums. (#17533)
Code is complicated, lets remove as much noise as possible to focus on
the important parts.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-16 16:50:42 -05:00
dotnet-maestro[bot] df2d746ea1
[net8.0] Update dependencies from xamarin/xamarin-macios (#17553)
This pull request updates the following dependencies

## From https://github.com/xamarin/xamarin-macios
- **Subscription**: 69411ae3-c771-4088-2d6e-08dac814288b
- **Build**: 20230216.3
- **Date Produced**: February 16, 2023 10:35:57 AM UTC
- **Commit**: 39361a37b1
- **Branch**: refs/heads/release/7.0.1xx-xcode14.2

- **Updates**:
  - **Microsoft.MacCatalyst.Sdk**: [from 16.2.1033 to 16.2.1034][4]
2023-02-16 18:21:33 +01:00
Manuel de la Pena 783ba7a8d9
[Generator] Use a specialized class to store the marshal types. (#17549)
Use a class that we can have to store the types and a single place to
locate the types to load.

Later we can use the class to write tests and move to a Dictionary
implementation that passes the tests and is more efficient.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-16 08:48:31 -05:00
Manuel de la Pena 28db48f6ee
[Generator] Refactor method that was forgotten as an extension one. (#17550)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-16 08:48:09 -05:00
Manuel de la Pena 6669ed18b0
[Generator] Move all attr related methods to the attr manager. (#17548)
Group all attr methods in the attr manager class.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2023-02-16 08:47:48 -05:00
Manuel de la Pena c744a8bbc7
[Generator] Refactor AsyncMethodInfo, set nullability and add collection extensions. (#17538)
Several changes:

- Refactored AsyncMethodInfo and move the collection extensions out of
the Generator class.
- Added tests for the collection extension methods.
- Fix a mistake/bug in which Last was used instead of LastOrDefault
(funny comment was close to the right reason).

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-16 08:47:28 -05:00
Manuel de la Pena be1bee04b4
[Generator] Refactor more string extensions. (#17532)
Move all the string methods that can be an extension to a static class
(re-use the present one) and add tests.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2023-02-16 08:45:43 -05:00
dotnet-maestro[bot] ec67c91627
[main] Update dependencies from dotnet/installer (#17545)
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.22579.2 to 7.0.100-1.23062.2 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 7.0.2 to 7.0.3 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer
- **Subscription**: 50c9492e-4671-4d1d-7920-08dabd1031a2
- **Build**: 20230214.27
- **Date Produced**: February 15, 2023 2:49:17 AM UTC
- **Commit**: 6d3cb5a4f9f758114727bce6a7fd965097a763fa
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.104-servicing.23109.16 to 7.0.104-servicing.23114.27][1]
  - **Microsoft.NET.ILLink.Tasks**: [from 7.0.100-1.22579.2 to 7.0.100-1.23062.2][2]
  - **Microsoft.AspNetCore.App.Ref**: [from 7.0.2 to 7.0.3][3]

[1]: 0709aa6...6d3cb5a
[2]: 8db10f4...19fa656
[3]: https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore/branches?baseVersion=GC7c81065&targetVersion=GCfebee99&_a=files
2023-02-16 09:21:05 +01:00
Rolf Bjarne Kvinge 7e6d0fdc23
[dotnet] Fix computing manifest version band. (#17536)
We need to use 'DOTNET_MANIFEST_VERSION_BAND' instead of
'DOTNET_VERSION_BAND', because the former always ends with '00' (which
manifest version bands are supposed), while the latter can have other numbers
(for instance 7.0.100 vs 7.0.101 - the former is a valid manifest version
band, the latter isn't).
2023-02-15 19:06:29 +01:00
Manuel de la Pena b0683b90d5
[Generator] Move PlatformName maps out of the generator and add tests. (#17539)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-15 12:12:13 -05:00
dotnet-maestro[bot] fd923c2d9e
[net8.0] Update dependencies from xamarin/xamarin-macios (#17544)
This pull request updates the following dependencies

## From https://github.com/xamarin/xamarin-macios
- **Subscription**: 69411ae3-c771-4088-2d6e-08dac814288b
- **Build**: 20230215.3
- **Date Produced**: February 15, 2023 12:54:13 PM UTC
- **Commit**: 8b361f2c7b
- **Branch**: refs/heads/release/7.0.1xx-xcode14.2

- **Updates**:
  - **Microsoft.MacCatalyst.Sdk**: [from 16.2.1032 to 16.2.1033][4]

[4]: d49549e...8b361f2
2023-02-15 17:47:02 +01:00
Manuel de la Pena 62cbbacafc
[Generator] Move the conversion attr out and enable nullability. (#17529)
Cleaned some code that could be simpler too.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2023-02-15 11:35:57 -05:00
dotnet-maestro[bot] 2c61a109ef
[net8.0] Update dependencies from xamarin/xamarin-macios (#17540)
This pull request updates the following dependencies

## From https://github.com/xamarin/xamarin-macios
- **Subscription**: 69411ae3-c771-4088-2d6e-08dac814288b
- **Build**: 20230214.21
- **Date Produced**: February 14, 2023 5:37:02 PM UTC
- **Commit**: d49549eda1
- **Branch**: refs/heads/release/7.0.1xx-xcode14.2

- **Updates**:
  - **Microsoft.MacCatalyst.Sdk**: [from 16.2.1030 to 16.2.1032][4]

[4]: e45edff...d49549e
2023-02-15 11:39:27 +01:00
dotnet-maestro[bot] 6fd20a51da
[main] Update dependencies from dotnet/installer (#17478)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: 50c9492e-4671-4d1d-7920-08dabd1031a2
- **Build**: 20230209.16
- **Date Produced**: February 10, 2023 2:27:00 AM UTC
- **Commit**: 0709aa684bebd00a44d298d05db8c86d23f9f192
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.103-servicing.23073.22 to 7.0.104-servicing.23109.16][8]

[8]: e36f7f3...0709aa6
2023-02-15 06:49:37 +01:00
Manuel de la Pena 9ca00b3b89
[Generator] Move out MarshalType and enable nullability. (#17531)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-14 10:27:38 -05:00
Manuel de la Pena 484dbcb960
[Generator] Refactor attr factory out and enable nullability. (#17528)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-14 10:21:04 -05:00
Manuel de la Pena 17e8200b30
[Generator] Move CustomAttributeDataExtensions to its own file and enable nullability. (#17526)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-14 10:18:48 -05:00
Manuel de la Pena 30f5169b46
[Generator] Remove not needed method that adds indirection. (#17525)
Remove more indirections that make the code more complicated to follow
that it really needs to be.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-14 10:18:02 -05:00
Rolf Bjarne Kvinge 2b03ac31a6
Bump mlaunch to fix an unneccessary warning. (#17523)
Ref: 645f1813c5
2023-02-14 15:00:01 +01:00
Haritha Mohan 375e8c62aa
[MapKit] Make MKMapRect.World static (#17522)
Fixes #14787
2023-02-13 16:34:45 -08:00
Manuel de la Pena 498ced1811
[Generator] Remove method that is already present in the reflection API. (#17524)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-13 19:17:38 -05:00