Skip to content

feat: mark the libraries as AOT compatible - #1222

Merged
vbreuss merged 1 commit into
Testably:mainfrom
StefanGreve:feat/aot-compatible
Nov 22, 2026
Merged

vbreuss merged 1 commit into
Testably:mainfrom
StefanGreve:feat/aot-compatible

Conversation

@StefanGreve

@StefanGreve StefanGreve commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Sets IsAotCompatible for net8.0 and later in Source/Directory.Build.props, with the condition from the Native AOT docs. The trim and AOT analyzers now run in this repository's build, and apps that set VerifyReferenceAotCompatibility no longer get IL3058 for these assemblies.

No source changes were needed. All seven libraries build without IL2xxx or IL3xxx warnings, and Native AOT apps built against this branch with RealFileSystem and with MockFileSystem publish and run. The API snapshots gain IsTrimmable from net8.0 and IsAotCompatible from net10.0, and the getting started page now mentions trimming and Native AOT.

Could you publish a core release once this is merged? The interface packages reach NuGet only through a core/v* tag, and consumers of the main packages keep resolving the unmarked 11.0.0 until the floor of their Testably.Abstractions.Interface range rises. The same change for TestableIO is in TestableIO/System.IO.Abstractions#1604.

@mergify

mergify Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

This pull request is merged.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 30 files

View guided diff | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Marks the seven libraries as Native AOT compatible on .NET 8 and later, updates API snapshots, and documents trimming support.

  • Apps can now use .NET 8-and-later libraries with AOT compatibility markers.

StefanGreve explicitly acknowledges that consumers still resolve the unmarked interface packages until a core release is published and the dependency floor is raised; that release work is deferred until after merging.

Reviews (1) · Last reviewed commit: "feat: mark the libraries as AOT compatib..." · Reviewed by Greptile

@vbreuss
vbreuss merged commit 16dc600 into Testably:main Nov 22, 2026
13 checks passed
@vbreuss

vbreuss commented Nov 22, 2026

Copy link
Copy Markdown
Member

Thanks, @StefanGreve; I will create a new release shortly.

vbreuss added a commit that referenced this pull request Nov 22, 2026
#1222 marks the libraries as AOT compatible, but the analyzers enabled by `IsAotCompatible` only see the libraries themselves. This adds a console app under `Tests/Aot` that is published with Native AOT for net8.0 and net10.0 on Ubuntu, Windows and macOS, with all trim and AOT warnings treated as errors, and runs the same checks with and without the JIT.

The checks cover the places that depend on private members or type names of the base class library (BCL): the separator fix in the `FileSystemWatcherMock` of a simulated OS, the timeout detection of `WaitAsync` on the mock `TimeProvider`, and the real file system detection of the memory-mapped files. Breaking each of these in the source makes the matching check fail.

The new `AotSmokeTests` pipeline target runs in `ci.yml` and `build.yml`, and the push jobs depend on it. The build schema is regenerated with the current Fallout version.
@github-actions

Copy link
Copy Markdown

This is addressed in release v8.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants