Previously, we'd do this:
* Collect all possible native references.
* Extract any compressed native references (*.framework.zip, *.xcframework.zip,
*.resources.zip) to disk.
* Resolve the resulting native references.
This doesn't work very well on Windows (in non-connected/Hot Restart mode),
because some compressed files may contain symlinks (in particular compressed
xcframeworks). If those symlinks are for any other platform than the one we're
building for, they shouldn't matter, but if we extract the entire compressed
xcframework before figuring out what we need from it, we'd run into symlinks
and not knowing whether they should be ignored or not.
So rework the process to:
* Collect all possible native references.
* Resolve the resulting native references, peeking into zip files if need be.
* Extract any compressed native references, but only the parts of the zip we need.
This way we won't run into any symlinks unless we really need them, and it
should also improve build performance slightly, even on macOS, since we're not
extracting files we won't need (which can be significant for xcframeworks).
Additionally:
* Add support for unzipping on Windows by using System.IO.Compression.
* Show an error if attempting to extract a symlink in the last step in the
reworked process on Windows.
* Some tests had to be updated (since they poked into internals of the
ResolveNativeReferences task, and those internals have changed).
Pipelines didn't like the scheduled variables so let's try using the
schedule displayName instead
---------
Co-authored-by: tj-devel709 <tjlambert@microsoft.com>
If the `RecursiveDir` metadata is empty, the GetDirectoryName method
throws an error because it isn't a valid path. This can happen on VS
design time builds.
1. Keep the .NET 6 feed, because even though we've dropped support for
.NET 6, parts of the build may still need access to the feed.
> Workload installation failed: microsoft.maccatalyst.sdk::16.2.19 is
not found in NuGet feeds [long list of feeds, but not the right one]
2. Pass a runsettings to 'dotnet test' to tell it to use the .NET
version we've downloaded, otherwise it will try to use any .NET version
installed on the system (🤦♂️) - which doesn't work because we need to
use .NET 8, and the system only has .NET 7.
This PR does a few things to help the Localization process happen more
efficiently:
1) Add a cron job
* One will run on Sundays (as before) and this one will set the new
variable to be true and will create a PR into main with the usable
translations
* The other will run after each weekday at around midnight and will
allow the Loc team to see our newly added error codes much faster but
will not look for the new localization for us to use each day.
2) Allow us to manually run the pipeline and create the Localization PR
with the new usable translations whenever we want (for example if there
was an error on the weekly build and we don't want to wait until the
next weekend to get the new strings)
Co-authored-by: tj-devel709 <tjlambert@microsoft.com>
- Updated Xamarin.Messaging to 1.9.99 to fix a connection problem in
remote builds because of an invalid reference to
System.Security.Cryptography.ProtectedData
- Generate Hot Restart specific build session id to fix an issue in
local builds that was conflicting with remote builds
---------
Co-authored-by: Emanuel Fernandez <emafern@microsoft.com>
There were two places that with merge conflicts from this PR:
https://github.com/xamarin/xamarin-macios/pull/17902
Maybe there could be a cecil test to catch `<<<<<<< HEAD` or other parts
of a merge conflict?
Co-authored-by: tj-devel709 <tjlambert@microsoft.com>
Fixes#17738
Addresses the initial issue of just documenting which properties are
tied to which configuration. But to make the documentation more helpful,
we should provide further context about what exactly these properties
mean. However, this isn't trivial as some properties are a bit
cryptic..once further info is acquired, it will be integrated in a later
revision.
This fixes an issue in the BundleStructure tests:
> error MSB3030: Could not copy the file
"/Users/builder/azdo/_work/4/s/xamarin-macios/tests/dotnet/BundleStructure/NoneP.dll"
because it was not found.
This PR contributes to https://github.com/dotnet/runtime/issues/83193. It
creates a new target `_CreateAOTDedupAssembly`, and makes the `_AOTCompile`
depend on it. Also, it changes the `AOTCompile` task to pass `dedup-skip` and
`dedup-include` to the Mono AOT compiler.
The change was tested on `MySingleView` app and `Monotouch` tests. Both apps
are working, but some monotouch tests are failing due to
`Arg_NotlmplementedException`. Assumption is that calls between Obj-C and C#
could be problematic, as with the dedup improvement enabled, extra methods got
moved from origin assemblies to the dedup assembly, so native to managed
mapping could be corrupted.
Here are preliminary results comparing size on disk and build time between the
baseline (`net8.0` branch) and the target (this branch). Binlog details are
[attached](https://github.com/xamarin/xamarin-macios/files/10942772/binlog.zip).
| App | Baseline size on disk .ipa (MB) | Target size on disk .ipa (MB) | Baseline size on disk .app (MB) | Target size on disk .app (MB) | Baseline build time (s) | Target build time (s) | .app diff (%) |
| ---------------------------------------- | ------------------------------- | ----------------------------- | ------------------------------- | ----------------------------- | ----------------------- | --------------------- | ------------- |
| MySingleView Release iOS | 5,40 | 5,40 | 29,2 | 15,20 | 29,18 | 16,77 | 47,94 |
| MySingleView Release iOSSimulator-arm64 | N/A | N/A | 469,5 | 341,80 | 468,00 | 330,00 | 27,20 |
| Monotouch Release llvm iOS | 49,00 | 38,80 | 209,60 | 157,40 | 115,00 | 130,00 | 24,90 |
Draft PR should get a full test run on the changes. The following tasks should
be resolved before making this PR ready for review.
This fixes a warning when documentation is enabled for a project:
> The file '~/.nuget/packages/fsharp.core/6.0.0/contentFiles/any/netstandard2.1/FSharp.Core.xml' does not specify a 'PublishFolderType' metadata, and a default value could not be calculated. The file will not be copied to the app bundle.
This doesn't change any behavior (as the warning says, the file wasn't copied
to the app bundle before either), but it makes the behavior explicitly
documented and silences the warning.
Fixes https://github.com/xamarin/xamarin-macios/issues/14939.
Fixes https://github.com/xamarin/xamarin-macios/issues/15897.
Should fix an issue in remote builds where if the connection gets
disconnected unexpectedly, the build might end up failing because the
main session id is changed and also the reconnection fails.
More details: https://github.com/xamarin/Xamarin.Messaging/pull/587
Should fix this:
> D:\a\_work\1\s\src\DotNet\Dependencies\Workloads.csproj : error
NU1102: Unable to find package
Microsoft.NET.Sdk.macOS.Manifest-8.0.100-preview.4 with version (=
13.1.8510-net8-p4) [D:\a\_work\1\s\src\DotNet\DotNet.csproj]
from https://github.com/dotnet/maui/pull/14241#issuecomment-1487598894.