This is needed in order to read the correct value of the
"IsHotRestartBuild" property set by the VS extension. Doing it in a
PropertyGroup at evaluation was not getting the correct value since it
was not being set as an MSBuild global property
This PR is related to this other one in the XVS extension:
https://github.com/xamarin/XamarinVS/pull/13612
This will allow the latest runtime identifier values to be evaluated in time during the MSBuild property evaluation phase.
Related and dependent of this PR: https://github.com/xamarin/XamarinVS/pull/13606
Use a make template for the build logic for our platform assemblies, so that we don't
unintentionally have slightly different build code for different platforms (especially
when making changes to the build this way ensures that we make the same change on all
platforms).
This also makes the code significantly shorter, and will make it easier to add more
platforms in the future if we ever need that.
The tramslations are meant to be done per week using the cron job. The
cron job does not use the main stage template, ergo we can simplify the
stage by removing the translations.
* Add obsolete attributes for all platforms.
* Make sure the same obsolete message is used on all platforms.
* Fix a few typos.
There are many more APIs to fix (as evidenced by the fact that this only
removes a few known failures), but this is how far I've gotten right now.
This makes it possible to simplify and remove a good chunk of related code.
Especially for CoreCLR this should be a minor perf improvement, because we'll do fewer transitions between managed and native code.
Also fix a few issues:
* Fix an issue with replicating availability attributes with a third digit.
The third version number is 'Build', not 'Revision' (which is fourth), so
adjust our code accordingly.
This fixes an issue where the copy of 'macos10.15.4' would become
'macos10.15' and we'd lose the third number.
* Fix an issue when generating filter code. We were using the wrong type as
the target (inlined) type, resulting in the wrong availability attributes
getting created sometimes.
* The APPLETLS_DEFINES variable is never set, so just remove it.
* Use MACOS_ as the platform prefix for macOS instead of MAC_.
* Stopped passing the same argument twice (this often happened for -inline-selectors).
* Use the same pattern for all platforms for: <PLATFORM>_DEFINES, <PLATFORM>_CORE_DEFINES,
<PLATFORM>_GENERATOR_FLAGS.
Note that there are many inconsistencies left, but I prioritized those affecting
.NET code, since legacy Xamarin code will be removed in a not so distant future.
Autotools-based project using libtool's -module flag generate plugins
with the .so extension that needs to be treated like DynamicLibraries in
terms of deployment location and relocation, except they are not linked
to the app.
This PR adds support for such .so files: they're treated as .dylib files, except
that they're not linked to the app.
The code to handle (and ignore) warnings was getting out of hand, so I've
unified it between all platforms. We now ignore the same warnings on every
platform, and have much fewer variables to reason about.
Move the class to its own file to simplify changes and code review.
Enable nullability in the class.
---------
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
* Enable nullability in NSHost, and fix misc issues.
* Add an explicit interface overload for IEquatable<NSHost>.Equals. Fixes this compiler warning:
error CS8767: Nullability of reference types in type of parameter 'host' of 'bool NSHost.Equals(NSHost host)' doesn't match implicitly implemented member 'bool IEquatable<NSHost>.Equals(NSHost? other)
Maybe a bad merge or we missed it.
---------
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Haritha Mohan <110641567+haritha-mohan@users.noreply.github.com>
Moved the extension methods to their own file and enabled nullable.
Fixed the following underlying bug:
The extension method that creates a valid parameter named does not do
the right thing in the following cases:
1. When the starting illegal char is NOT a number. It will prepend @
fixing nothing. Example " OHOH" to "@ OHOH"
2. When the illegal chars is in the middle of the param name. Example
"OH OH" to "@OH OH"
I have fixed the method to return null in those ocassions (we will need
to enable nullability later in the generator, is too much for this PR).
Tests have been added to ensure we do not have such an issue again.
---------
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Stop implying Mac Catalyst attributes from the iOS attributes, and instead
treat Mac Catalyst like all the other platforms (not implying anything from
any other platform).
This makes our attribute logic much easier to reason about and understand.
It also required adding numerous Mac Catalyst attributes that were previously
implied. This task was way too big to do manually, so I made some changes to
Chris' mellite tool, and managed to do it quite easily with Roslyn with the
changes in this branch: https://github.com/rolfbjarne/mellite/tree/explicit-maccatalyst-attributes