Repository navigation
Declare the library compatible with NativeAOT - #186
Merged
Merged
Conversation
The library already compiles and runs under NativeAOT: it has no dependencies, and its only reflection-style call is reading its own assembly version. Nothing said so, and nothing would notice a change that broke it. IsAotCompatible marks the package as safe for AOT and trimming, and turns on the AOT, trim and single-file analyzers, so a change that isn't safe now raises a build warning here rather than in a host's publish. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sets
<IsAotCompatible>true</IsAotCompatible>onXTerm.NET.csproj. That's the whole change.The library already works under NativeAOT: it has no dependencies, and its only reflection-style call is
Assembly.GetName().Versionfor XTVERSION. But nothing declared that, and nothing would notice a change that broke it. This property marks the package as safe for AOT and trimming, and turns on the AOT, trim and single-file analyzers, so an unsafe change raises a build warning here rather than in a host's publish. They are warnings, not errors, so they won't fail a build on their own.How I checked
Activator.CreateInstance(Type.GetType(n)!),MakeGenericType) raised IL2057 and IL3050, so they can fire.PublishAotand run natively on macOS arm64 passed all 11 checks: printing, SGR colours, XTVERSION (reporting the right version through that one call), OSC 11, device attributes, Sixel and kitty images (these two only that they don't throw),FindandBufferScan, 5,000 scrolled lines with wide characters, clusters and emoji, and resize. That was against the commit before the version bump to 3.0.2.XTerm.NET.Testsproject passes with the property set: 2547 passed, 1 skipped, 0 failed.Only macOS arm64 was run natively; there's no AOT publish in CI, so the analyzers are the ongoing guard.
🤖 Generated with Claude Code