Add support for function pointers to BlockLiteral, and use it to update
almost all manually bound block code to use function pointers (in .NET).
Also add support to the linker for optimizing the new block API.
Contributes towards https://github.com/xamarin/xamarin-macios/issues/15783.
Without the extra condition, the stage iwll run always when the stage
dependency was skipped or cancelled.
Backport of #17703
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Because the variable is an output variable, we need to provide the name
of the step that creates the variable. This is nto needed in other
stages because we are setting the variable via the env vars of the
stage.
* 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.
We try to pass another name to the TrampolineInfo constructor, but it's
ignored, and 'Invoke' is always used, so just hardcode 'Invoke' everywhere
instead.
This makes the code a little bit simpler.
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.
A ref struct has a few limitations that makes a lot of sense for blocks:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/ref-struct,
so by making BlockLiteral a ref struct, we're getting the C# compiler to help
us not writing broken code by accident.
The limitations also mean that it's a breaking change, so we can't do it
before XAMCORE_5_0.
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.
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.
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
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>
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>
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.
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).
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.