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

15264 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge b2ae8507e0
[AppKit] Make sure NSButtons are treated as toggled objects after setting a field. Fixes #17635. (#17639)
If a wrapper type has a custom field (with a non-default value), we need to
mark the instance as dirty, to make it participate in the toggle-ref
machinery, and not get collected as long as the corresponding native instance
is around (otherwise the GC will collect the value in the field).

Fixes https://github.com/xamarin/xamarin-macios/issues/17635.
2023-03-01 16:35:10 +01:00
Steve Hawley f77929a0ed
[dotnet] security pinvoke and nullable string arrays (#17643)
Modded AllocStringArray to allow nullable strings.
2023-03-01 09:24:46 -05:00
Steve Hawley cf53aeeb47
[dotnet] network pinvoke (#17642) 2023-03-01 09:24:08 -05:00
Steve Hawley 239f668626
[dotnet] mac CoreGraphics pinvokes (#17634) 2023-03-01 09:21:53 -05:00
Manuel de la Pena 0fb19bc868
[Sim] Bump min simulator versions for ventura. (#17645) 2023-03-01 08:13:19 -05:00
Rolf Bjarne Kvinge 967358ccf6
[src] Refactor block code to use blittable callbacks. (#17641)
This is mostly converting 'bool' arguments to 'byte' arguments, and 'string'
arguments to 'IntPtr' with custom utf8->string conversions.

This is necessary in order to convert all block callbacks to use
UnmanagedCallersOnly function pointers (which can't have non-blittable types
in their signature).

Contributes towards https://github.com/xamarin/xamarin-macios/issues/15783.
2023-03-01 10:26:52 +01:00
Mauro Agnoletti 2178951527
[main] Updated Xamarin.Messaging to 1.9.59 (#17646)
Includes latest fixes like support for retry and reconnect, new telemetry, bug fixing, etc.

Also added Merq.Core.dll to dotnet/Workloads/SignList.xml because now it comes as part of Xamarin.Messaging
2023-03-01 08:20:59 +01:00
Rolf Bjarne Kvinge 8f8818dd72
[generator] Use the new Block API that makes BlockLiteral disposable. (#17612)
Contributes towards https://github.com/xamarin/xamarin-macios/issues/15783.
2023-03-01 07:23:21 +01:00
Manuel de la Pena 7933da85db
[CI] Add a prefix to the uploads and downloads to avoid collisions. (#17636)
This allows to add a prefix to the uploads/downloads of the CI to help
avoid collisions with other projects when the template is used in a diff
template.

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-02-28 16:19:03 -05:00
TJ Lambert 80fdc5871a
[Localization] Revert "[CI] Remove the translations from the main stage. (#17453)" (#17537)
We actually do need to keep this task inside our normal builds for the
Loc team to identify if there are new translations through the
localizationDrop artifact. The other pipeline that runs this task on the
cron job is used for a separate part of the localization process that
creates the PRs with the usable translations.

We re-add the job and provide a new parameter to ignore the translations (set to be true by default) that way other pipelines using the template can ignore the job.


https://github.com/xamarin/maccore/wiki/Localization#the-translation-process

---------

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2023-02-28 12:32:34 -05:00
Steve Hawley ac1dad4dcc
[dotnet] fix pinvokes for Darwin (#17633)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2023-02-28 10:19:16 -05:00
Rolf Bjarne Kvinge 429c423075
[ImageIO] Simplify the block code in CGImageAnimation. (#17622)
These CGImageAnimation.AnimateImage functions are one-directional only, in
that they're only used to call into Objective-C from managed code, and not
into managed code from Objective-C. This means we can remove any block code
related to the latter scenario, since it's not needed.
2023-02-28 14:38:13 +01:00
Rolf Bjarne Kvinge 8285c08c17
[registrar] Improve support for pointers to value types in exported signatures. (#17608)
This will be required when we make blocks use blittable callbacks, since we'll
have to use pointers in a few cases (because ref/out arguments aren't
blittable).
2023-02-28 11:48:27 +01:00
Steve Hawley aacedd12c7
[dotnet] Remove dead method, add some ignores (#17631)
Removed a flavor of `class_addMethod` that is unused.
Ignored a few cases that are going to be in .NET and/or may break AOT
optimizations

Now all iOS pivots pass, 17 macOS remain.
2023-02-27 17:56:06 -05:00
Steve Hawley 32961d97dd
[dotnet] UIMain changes (#17611)
handling of string array for args
2023-02-27 10:23:39 -05:00
Rolf Bjarne Kvinge 24799c68da
[ImageIO] Update CGImageMetadata.EnumerateTags to use the branch new Block API. (#17621) 2023-02-27 14:50:15 +01:00
Rolf Bjarne Kvinge aaa79e85ed
[tests] Improve diagnostic output in FSEventStreamTest. (#17614)
Ref: https://github.com/xamarin/maccore/issues/2630
2023-02-27 14:14:05 +01:00
Manuel de la Pena 876522e374
[CI] The DropsPAT was removed, change it to a new one. (#17610)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-02-27 09:55:53 +01:00
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 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
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
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
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
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
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
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
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
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
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] 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