Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an Azure DevOps CI stage to build and run Uno Skia iOS runtime tests with NativeAOT enabled, using a dedicated build/test template pair and a small enhancement to the existing iOS Skia build script to toggle AOT via an environment variable.
Changes:
- Extend
skia-ios-uitest-build.shto optionally pass-p:SkiaPublishAot=truewhenNAOTis set. - Add a new CI stage
Tests - iOS+NativeAOT Skiawiring new build + test templates. - Introduce new Azure DevOps templates for iOS NativeAOT Skia build and runtime-test execution.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| build/test-scripts/skia-ios-uitest-build.sh | Adds an NAOT-controlled MSBuild property to enable NativeAOT for iOS Skia builds. |
| build/ci/tests/.azure-devops-tests-skia-stages.yml | Adds a new iOS NativeAOT Skia stage that runs the new build and test templates. |
| build/ci/tests/.azure-devops-tests-ios-nativeaot-skia.yml | New template that runs iOS Skia runtime tests for NativeAOT build output. |
| build/ci/tests/.azure-devops-tests-ios-nativeaot-skia-build.yml | New template that builds and publishes the iOS SamplesApp artifact for NativeAOT runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d6f1fc1 to
bf19192
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23966/wasm-skia-net9/index.html |
|
Something isn't right; needs more investigation. The SamplesApp size both with and without Native AOT are the same size, and the Native AOT version has a bunch of The |
|
Earlier I wrote:
The problem is that Native AOT codegen/etc. only occurs as part of OK, so why don't we update it to use Because we're producing a simulator iossimulator-x64 build, because we run the test app on the simulator. OK, so why can't we which suggests that there is no way to test Native AOT builds on CI when using the simulator. (Unless someone knows of a workaround…) |
|
Yesterday, I wrote: Good news! Rolf has a workaround: Bad news: it doesn't work locally. Update diff --git a/build/test-scripts/skia-ios-uitest-build.sh b/build/test-scripts/skia-ios-uitest-build.sh
old mode 100644
new mode 100755
index 5260619151..1b10da386c
--- a/build/test-scripts/skia-ios-uitest-build.sh
+++ b/build/test-scripts/skia-ios-uitest-build.sh
@@ -6,4 +6,8 @@ _TFM="${TFM:=net10.0-ios}"
cd $BUILD_SOURCESDIRECTORY/src/SamplesApp/SamplesApp.Skia.netcoremobile
-dotnet build -f "$_TFM" -c Release "-p:UnoTargetFrameworkOverride=$_TFM" -p:UNO_DISABLE_ANALYZERS_IN_SAMPLES=true /bl:$BUILD_ARTIFACTSTAGINGDIRECTORY/skia-ios-netcoremobile-sampleapp.binlog
+if [ "${NAOT:=}" = "1" ]; then
+ dotnet build -f "$_TFM" -c Release "-p:UnoTargetFrameworkOverride=$_TFM" -p:UNO_DISABLE_ANALYZERS_IN_SAMPLES=true /bl:$BUILD_ARTIFACTSTAGINGDIRECTORY/skia-ios-nativeaot-netcoremobile-sampleapp.binlog -p:SkiaPublishAot=true -p:_IsPublishing=true
+else
+ dotnet build -f "$_TFM" -c Release "-p:UnoTargetFrameworkOverride=$_TFM" -p:UNO_DISABLE_ANALYZERS_IN_SAMPLES=true /bl:$BUILD_ARTIFACTSTAGINGDIRECTORY/skia-ios-netcoremobile-sampleapp.binlog
+fiRun it: TFM=net11.0-ios \
NAOT=1 \
BUILD_SOURCESDIRECTORY=`pwd` \
BUILD_ARTIFACTSTAGINGDIRECTORY=`pwd`/artifacts \
sh build/test-scripts/skia-ios-uitest-build.sh…and it fails: Manually run the failing command, and we get the full error: % (cd src/SamplesApp/SamplesApp.Skia.netcoremobile; "$HOME/.nuget/packages/runtime.osx-arm64.microsoft.dotnet.ilcompiler/11.0.0-preview.6.26359.118/tools/ilc" @"obj/Release/net11.0-ios/ios-arm64/native/SamplesApp.ilc.rsp" )
Error: Sequence point value is out of range.
System.BadImageFormatException: Sequence point value is out of range.
at System.Reflection.Throw.SequencePointValueOutOfRange() in /_/src/runtime/src/libraries/System.Reflection.Metadata/src/System/Reflection/Throw.cs:line 239
at System.Reflection.Metadata.SequencePointCollection.Enumerator.MoveNext() in /_/src/runtime/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/SequencePointCollection.cs:line 86
at Internal.TypeSystem.Ecma.PortablePdbSymbolReader.<GetSequencePointsForMethod>d__10.MoveNext() in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/PortablePdbSymbolReader.cs:line 147
at ILCompiler.Logging.MessageOrigin..ctor(MethodIL, Int32) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Logging/MessageOrigin.cs:line 65
at ILCompiler.Dataflow.ReflectionMethodBodyScanner.HandleGetField(MethodIL, Int32, FieldDesc) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ReflectionMethodBodyScanner.cs:line 230
at ILCompiler.Dataflow.MethodBodyScanner.ScanStfld(MethodIL, Int32, ILOpcode, FieldDesc, Stack`1, Nullable`1[], InterproceduralState&) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/MethodBodyScanner.cs:line 1151
at ILCompiler.Dataflow.MethodBodyScanner.Scan(MethodIL, InterproceduralState&) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/MethodBodyScanner.cs:line 673
at ILCompiler.Dataflow.MethodBodyScanner.InterproceduralScan(MethodIL) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/MethodBodyScanner.cs:line 310
at ILCompiler.Dataflow.ReflectionMethodBodyScanner.InterproceduralScan(MethodIL) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ReflectionMethodBodyScanner.cs:line 117
at ILCompiler.Dataflow.ReflectionMethodBodyScanner.ScanAndProcessReturnValue(NodeFactory, FlowAnnotations, Logger, MethodIL, List`1&) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ReflectionMethodBodyScanner.cs:line 137
at ILCompiler.DependencyAnalysis.DataflowAnalyzedMethodNode.GetStaticDependencies(NodeFactory) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DataflowAnalyzedMethodNode.cs:line 33
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.GetStaticDependenciesImpl(DependencyNodeCore`1) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 183
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ProcessMarkStack() in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 260
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 309
at ILCompiler.ILScanner.ILCompiler.IILScanner.Scan() in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ILScanner.cs:line 157
at ILCompiler.Program.<Run>g__RunScanner|4_0(Program.<>c__DisplayClass4_0&) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler/Program.cs:line 525
at ILCompiler.Program.Run() in /_/src/runtime/src/coreclr/tools/aot/ILCompiler/Program.cs:line 594
at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass263_0.<.ctor>b__0(ParseResult) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs:line 340Which brings us to another good news/bad news: which is rather concerning… Even worse, it also fails on uno/master while using .NET 10! (This is why having such a test stage would have been handy earlier… I believe this worked at one point in time! A year ago…?) |
iOS supports Native AOT, and has since .NET 9. It might be a good idea to actually *test* this on CI?
bf19192 to
9037eb9
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23966/wasm-skia-net9/index.html |
|
|
|
Yesterday, I wrote:
The "good" news is that this isn't a new bug, it isn't a recent regression. The "bad" news is that the bug -- or at least something that looks identical -- has been open since 2025: dotnet/maui#37782 dotnet/maui#37782 started life as a MAUI issue, moved to Roslyn, and is still there… but based on this comment, I believe this is actually an The bug is that The workaround sounds like it should be to not use debug symbols. That "works", in that we no longer error out in Instead, it crashes while attempting to link! Ever get the feeling that this is cursed? |
|
Meanwhile, through some interaction with Claude, I think it's not just Claude cooked this "pdb verification" app: verify-pdb-sequence-points#!/usr/bin/env -S dotnet --
#:package Mono.Options@6.12.0.148
using System.Reflection.Metadata;
using System.Reflection.Metadata.Ecma335;
using System.Reflection.PortableExecutable;
using Mono.Options;
var Name = Environment.GetCommandLineArgs()[0];
int verbosity = 0;
var show_help = false;
var options = new OptionSet {
$"Usage: {Name} [-v] <PDB-FILES>",
"",
"Verify the sequence points within `.pdb` files.",
"",
"Options:",
{
"v|verbose:",
"Increase logging verbosity or set to {VALUE}.",
(int? v) => verbosity = v ?? (verbosity + 1)
},
{ "help", "Show this message and exit.", v => show_help = v != null },
};
List<string> pdb_files;
try {
pdb_files = options.Parse(args);
}
catch (Exception e) {
Console.Error.WriteLine($"{Name}: {e.Message}");
if (verbosity > 0)
{
Console.Error.WriteLine(e);
}
return 1;
}
if (pdb_files.Count == 0 || show_help)
{
options.WriteOptionDescriptions(Console.Out);
return 0;
}
if (args.Length == 0)
{
Console.Error.WriteLine("Usage: verify-pdb-sequence-points <path-to-pdb> [more paths...]");
return 1;
}
int totalBad = 0;
foreach (var pdbPath in args)
{
totalBad += VerifyPdb(pdbPath);
}
return totalBad > 0 ? 1 : 0;
int VerifyPdb(string pdbPath)
{
Console.WriteLine($"{pdbPath}");
byte[] pdbBytes;
try
{
pdbBytes = File.ReadAllBytes(pdbPath);
}
catch (Exception ex)
{
Console.WriteLine($" ERROR reading file: {ex.Message}");
return 1;
}
using MetadataReaderProvider provider = MetadataReaderProvider.FromPortablePdbStream(new MemoryStream(pdbBytes));
MetadataReader pdbReader = provider.GetMetadataReader();
// Optional: a sibling .dll with matching row numbers gives us type/method names.
var dllPath = Path.ChangeExtension(pdbPath, ".dll");
Dictionary<int, string>? namesByRow = File.Exists(dllPath) ? TryLoadNames(dllPath) : null;
int methodCount = pdbReader.GetTableRowCount(TableIndex.MethodDebugInformation);
int badCount = 0;
for (int row = 1; row <= methodCount; row++)
{
var handle = MetadataTokens.MethodDebugInformationHandle(row);
MethodDebugInformation info;
try
{
info = pdbReader.GetMethodDebugInformation(handle);
}
catch (Exception ex)
{
badCount++;
Console.WriteLine($" [row {row}] {Describe(row, namesByRow)}: FAILED to read debug info header: {ex.GetType().Name}: {ex.Message}");
continue;
}
if (info.SequencePointsBlob.IsNil)
{
continue;
}
int decoded = 0;
SequencePoint last = default;
bool haveLast = false;
try
{
foreach (var sp in info.GetSequencePoints())
{
last = sp;
haveLast = true;
decoded++;
}
}
catch (Exception ex)
{
badCount++;
string context = haveLast
? $"after {decoded} good sequence point(s); last good IL=0x{last.Offset:X} line={last.StartLine}"
: "on the very first sequence point";
Console.WriteLine($" [row {row}] {Describe(row, namesByRow)}: {ex.GetType().Name}: {ex.Message} ({context})");
if (verbosity > 0)
{
var reader = new StringReader(ex.ToString());
string? line;
while ((line = reader.ReadLine()) != null)
{
Console.WriteLine($" {line}");
}
}
}
}
if (badCount == 0)
{
Console.WriteLine($" OK - {methodCount} method(s) checked, all sequence points decoded cleanly.");
}
else
{
Console.WriteLine($" {badCount} of {methodCount} method(s) have corrupt sequence points.");
}
return badCount;
}
static string Describe(int row, Dictionary<int, string>? namesByRow) =>
namesByRow is not null && namesByRow.TryGetValue(row, out var name) ? name : "(name unavailable - no matching .dll found)";
static Dictionary<int, string>? TryLoadNames(string dllPath)
{
try
{
using var dllStream = File.OpenRead(dllPath);
using var peReader = new PEReader(dllStream);
var mdReader = peReader.GetMetadataReader();
var result = new Dictionary<int, string>();
foreach (var methodHandle in mdReader.MethodDefinitions)
{
var methodDef = mdReader.GetMethodDefinition(methodHandle);
var typeDef = mdReader.GetTypeDefinition(methodDef.GetDeclaringType());
var typeName = mdReader.GetString(typeDef.Name);
var methodName = mdReader.GetString(methodDef.Name);
var debugHandle = methodHandle.ToDebugInformationHandle();
var row = MetadataTokens.GetRowNumber(debugHandle);
result[row] = $"{typeName}::{methodName}";
}
return result;
}
catch
{
return null;
}
}Here's something interesting. Take what I think is the original % dotnet run --project …/verify-pdb-sequence-points/*.csproj src/SamplesApp/SamplesApp.Skia/bin/Release/net10.0/SamplesApp.Skia.pdb
[row 17890] NavigationViewInfoBadgeTestPage::.ctor: BadImageFormatException: Invalid compressed integer. (after 384 good sequence point(s); last good IL=0x11F1 line=21263)
[row 24182] ScrollViewDynamicPage::.ctor: BadImageFormatException: Invalid compressed integer. (after 156 good sequence point(s); last good IL=0x6AC line=8956)
[row 52778] TeachingTipPage::.ctor: BadImageFormatException: Invalid compressed integer. (after 152 good sequence point(s); last good IL=0x685 line=8280)
[row 56413] ItemsViewSummaryPage::.ctor: BadImageFormatException: Invalid compressed integer. (after 339 good sequence point(s); last good IL=0xE99 line=18531)
4 of 159897 method(s) have corrupt sequence points.Look at the linked version, and: % dotnet run --project …/verify-pdb-sequence-points/*.csproj src/SamplesApp/SamplesApp.Skia.netcoremobile/obj/Release/net10.0-ios/ios-arm64/linked/SamplesApp.Skia.pdb
[row 18209] NavigationViewInfoBadgeTestPage::.ctor: BadImageFormatException: Sequence point value is out of range. (after 384 good sequence point(s); last good IL=0x11F1 line=21263)
[row 24501] ScrollViewDynamicPage::.ctor: BadImageFormatException: Sequence point value is out of range. (after 156 good sequence point(s); last good IL=0x6AC line=8956)
[row 53919] TeachingTipPage::.ctor: BadImageFormatException: Sequence point value is out of range. (after 152 good sequence point(s); last good IL=0x685 line=8280)
[row 57554] ItemsViewSummaryPage::.ctor: BadImageFormatException: Sequence point value is out of range. (after 339 good sequence point(s); last good IL=0xE99 line=18531)
4 of 162556 method(s) have corrupt sequence points.What I suspect is that there is a Roslyn bug which produces the |
|
Last week, I mentioned a crash in clang++ when trying to build SamplesApp for iOS+Native AOT:
This has been filed as: dotnet/macios#26428 |
Fixes: #24036 Context: #23966 Context: dotnet/macios#26428 Context: dotnet/cecil#504 Context: jbevain/cecil#982 Context: jbevain/cecil@0.11.4...0.11.6 Context: jbevain/cecil@0.10.1...0.11.6 In The Beginning™ was a simple idea: why don't we have an iOS+Native AOT test stage? Thus began #23966, which promptly fell over, caught on fire, and sank into the swamp. There are two issues with #23966: 1. CI was unhappy; it errors out with …/Xamarin.Shared.targets(2073,3): error : No valid iOS code signing keys found in keychain. You need to request a codesigning certificate from https://developer.apple.com. Not sure what's happening there. It doesn't happen locally… 2. It couldn't build locally either! The initial attempt to build locally would fail in `ilc`: # note: using changes from #23966 % TFM=net11.0-ios \ NAOT=1 \ BUILD_SOURCESDIRECTORY=`pwd` \ BUILD_ARTIFACTSTAGINGDIRECTORY=`pwd`/artifacts \ sh build/test-scripts/skia-ios-uitest-build.sh … …/unoplatform/uno/src/SourceGenerators/Uno.UI.Tasks/Content/Uno.UI.Tasks.targets(487,3): warning Failed to resolve assembly `JetBrains.Annotations, Version=4242.42.42.42, Culture=neutral, PublicKeyToken=1010a0d8d6380325`: Failed to resolve assembly: 'JetBrains.Annotations, Version=4242.42.42.42, Culture=neutral, PublicKeyToken=1010a0d8d6380325' EXEC : error Sequence point value is out of range. $HOME/.nuget/packages/microsoft.dotnet.ilcompiler/11.0.0-preview.6.26359.118/build/Microsoft.NETCore.Native.targets(359,5): error MSB3073: The command ""$HOME/.nuget/packages/runtime.osx-arm64.microsoft.dotnet.ilcompiler/11.0.0-preview.6.26359.118/tools/ilc" @"obj/Release/net11.0-ios/ios-arm64/native/SamplesApp.ilc.rsp"" exited with code 1. Thus began a fair bit of investigation, some of which is mentioned in #24036 and dotnet/cecil#504. What happened was a "failure cascade": 1. The `<Csc/>` task produced a `.pdb` file. 2. Uno's `<EmbeddedResourceInjectorTask_v0/>` task would use Cecil to process the assembly and `.pdb` file from (1). Uno was using, at most, Mono.Cecil 0.11.4, which had a bug around the encoding of "compressed" integers within `.pdb` files. (This is later fixed in jbevain/cecil#982, and released as part of Mono.Cecil 0.11.6.) The updated `.pdb` file would contain "Invalid compressed integer" values. 3. Later, `illink` would run, which has it's own separate copy of Mono.Cecil -- from dotnet/cecil -- which would *also* update the `.pdb` files from (2). When `illink` ran, any "Invalid compressed integer" values would be further corrupted. 4. Later still, when `ilc` runs, it would process the `.pdb` files produced by (3), and at this point instead of "silently corrupting" data, it would error out entirely: Error: Sequence point value is out of range. System.BadImageFormatException: Sequence point value is out of range. at System.Reflection.Throw.SequencePointValueOutOfRange() in /_/src/runtime/src/libraries/System.Reflection.Metadata/src/System/Reflection/Throw.cs:line 239 at System.Reflection.Metadata.SequencePointCollection.Enumerator.MoveNext() in /_/src/runtime/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/SequencePointCollection.cs:line 86 at Internal.TypeSystem.Ecma.PortablePdbSymbolReader.<GetSequencePointsForMethod>d__10.MoveNext() in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/PortablePdbSymbolReader.cs:line 147 at ILCompiler.Logging.MessageOrigin..ctor(MethodIL, Int32) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Logging/MessageOrigin.cs:line 65 (Failure cascades are fun!) *Part* of the fix here is to update Uno to use Mono.Cecil 0.11.6, which contains the fix for reading and writing "compressed" integers in `.pdb` files. That is done here. Updating Cecil will *not* fix #23966, but is a partial prerequisite. A full fix will require dotnet/cecil#504 to be merged and released, (currently merged), `illink` updated to use dotnet/cecil#504, and *then* there's dotnet/macios#26428, in which `clang++` crashes when trying to link everything even if we get past the whole `.pdb` mess (which reportedly is fixed in the not-yet-released .NET 11 RC1). (Aside: the `.pdb` mess can be avoided by NOT USING `.pdb` FILES, e.g. buil with `-p:DebugType=none`. However, who wants to do that?) …which still leaves the original "how do we get this building on CI" question… Baby steps!
Fixes: unoplatform#24036 Context: unoplatform#23966 Context: dotnet/macios#26428 Context: dotnet/cecil#504 Context: jbevain/cecil#982 Context: jbevain/cecil@0.11.4...0.11.6 Context: jbevain/cecil@0.10.1...0.11.6 In The Beginning™ was a simple idea: why don't we have an iOS+Native AOT test stage? Thus began unoplatform#23966, which promptly fell over, caught on fire, and sank into the swamp. There are two issues with unoplatform#23966: 1. CI was unhappy; it errors out with …/Xamarin.Shared.targets(2073,3): error : No valid iOS code signing keys found in keychain. You need to request a codesigning certificate from https://developer.apple.com. Not sure what's happening there. It doesn't happen locally… 2. It couldn't build locally either! The initial attempt to build locally would fail in `ilc`: # note: using changes from unoplatform#23966 % TFM=net11.0-ios \ NAOT=1 \ BUILD_SOURCESDIRECTORY=`pwd` \ BUILD_ARTIFACTSTAGINGDIRECTORY=`pwd`/artifacts \ sh build/test-scripts/skia-ios-uitest-build.sh … …/unoplatform/uno/src/SourceGenerators/Uno.UI.Tasks/Content/Uno.UI.Tasks.targets(487,3): warning Failed to resolve assembly `JetBrains.Annotations, Version=4242.42.42.42, Culture=neutral, PublicKeyToken=1010a0d8d6380325`: Failed to resolve assembly: 'JetBrains.Annotations, Version=4242.42.42.42, Culture=neutral, PublicKeyToken=1010a0d8d6380325' EXEC : error Sequence point value is out of range. $HOME/.nuget/packages/microsoft.dotnet.ilcompiler/11.0.0-preview.6.26359.118/build/Microsoft.NETCore.Native.targets(359,5): error MSB3073: The command ""$HOME/.nuget/packages/runtime.osx-arm64.microsoft.dotnet.ilcompiler/11.0.0-preview.6.26359.118/tools/ilc" @"obj/Release/net11.0-ios/ios-arm64/native/SamplesApp.ilc.rsp"" exited with code 1. Thus began a fair bit of investigation, some of which is mentioned in unoplatform#24036 and dotnet/cecil#504. What happened was a "failure cascade": 1. The `<Csc/>` task produced a `.pdb` file. 2. Uno's `<EmbeddedResourceInjectorTask_v0/>` task would use Cecil to process the assembly and `.pdb` file from (1). Uno was using, at most, Mono.Cecil 0.11.4, which had a bug around the encoding of "compressed" integers within `.pdb` files. (This is later fixed in jbevain/cecil#982, and released as part of Mono.Cecil 0.11.6.) The updated `.pdb` file would contain "Invalid compressed integer" values. 3. Later, `illink` would run, which has it's own separate copy of Mono.Cecil -- from dotnet/cecil -- which would *also* update the `.pdb` files from (2). When `illink` ran, any "Invalid compressed integer" values would be further corrupted. 4. Later still, when `ilc` runs, it would process the `.pdb` files produced by (3), and at this point instead of "silently corrupting" data, it would error out entirely: Error: Sequence point value is out of range. System.BadImageFormatException: Sequence point value is out of range. at System.Reflection.Throw.SequencePointValueOutOfRange() in /_/src/runtime/src/libraries/System.Reflection.Metadata/src/System/Reflection/Throw.cs:line 239 at System.Reflection.Metadata.SequencePointCollection.Enumerator.MoveNext() in /_/src/runtime/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/SequencePointCollection.cs:line 86 at Internal.TypeSystem.Ecma.PortablePdbSymbolReader.<GetSequencePointsForMethod>d__10.MoveNext() in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/PortablePdbSymbolReader.cs:line 147 at ILCompiler.Logging.MessageOrigin..ctor(MethodIL, Int32) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Logging/MessageOrigin.cs:line 65 (Failure cascades are fun!) *Part* of the fix here is to update Uno to use Mono.Cecil 0.11.6, which contains the fix for reading and writing "compressed" integers in `.pdb` files. That is done here. Updating Cecil will *not* fix unoplatform#23966, but is a partial prerequisite. A full fix will require dotnet/cecil#504 to be merged and released, (currently merged), `illink` updated to use dotnet/cecil#504, and *then* there's dotnet/macios#26428, in which `clang++` crashes when trying to link everything even if we get past the whole `.pdb` mess (which reportedly is fixed in the not-yet-released .NET 11 RC1). (Aside: the `.pdb` mess can be avoided by NOT USING `.pdb` FILES, e.g. buil with `-p:DebugType=none`. However, who wants to do that?) …which still leaves the original "how do we get this building on CI" question… Baby steps! (cherry picked from commit 947bda0)
iOS supports Native AOT, and has since .NET 9.
It might be a good idea to actually test this on CI?
GitHub Issue: closes https://github.com/unoplatform/uno-private/issues/2279
PR Type:
🏗️ Build or CI related changes
What changed? 🚀
PR Checklist ✅
Screenshots Compare Test Runresults.