Repository navigation
Conversation
The engine is about to be replaced, and the scenarios cover too little of C# to prove a replacement matches. A generator now writes old and new versions that cover generics, nested types, by-ref parameters, indexers, events, operators, explicit implementations, attributes and every accessibility; 100 fixed seeds are snapshotted in every format. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…mbly The comparison ran on eight dlls built in 2020 from an unmerged branch of an archived fork, for .NET Framework, that nobody could rebuild. Engine/ ports JustAssembly's comparers onto System.Reflection.Metadata and JustDecompile's naming with them, so every report comes out the same, quirks included. The corpus snapshots, 3000 further generated versions and seven real package upgrades show no difference against the old build. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
The comparison now runs on a port of JustAssembly onto System.Reflection.Metadata, so
src/assembly-differ/liband its eight vendored dlls are gone. Every report comes out exactly as before.Prompt summary: The tool is being dusted off: new subcommands, first releases that do not fail, and pull request comments and labels. This step replaces the engine first, so that later fixes land on code that can be built and changed. The hidden
diffcommand must keep behaving the same, so the old engine's output is the specification.Why
The dlls in
libcame from the unmergedpublic-typesbranch of nullean/JustAssembly, an archived fork. They were built in 2020 for .NET Framework 4.5 and no source in any branch rebuilds them. They also bring a fork of Mono.Cecil and a 1 MB decompiler that the comparison only used to format names.What
A port, not a rewrite
Engine/reproduces JustAssembly's comparers: the same sorted merge, the same order of checks and the same visibility rules. It reads metadata with System.Reflection.Metadata and decodes signatures into a small type tree. That tree renders the way Mono.Cecil spells a type, which orders members and names attribute constructors, and the way JustDecompile's C# writer does, which the reports show. JustAssembly's quirks stay, because changing a report is a change to the contract. A type that became less visible is still reported as more visible, since JustAssembly subtracted byte-backed enum values and the result wrapped around. Nested types are still named.Name.A corpus written by the old engine
The first commit adds a generator for old and new versions of a library. It covers classes, structs, interfaces, enums and delegates, generics with variance, nested types, by-ref parameters, indexers, events, operators, explicit implementations, attributes and every accessibility. 400 seeds are checked to compile. The old engine's output for 100 of them, in every format, is snapshotted before the engine changes. The new engine reproduces all 100.
Comparing with another build
ReferenceTestsruns this build and another one on further generated versions and requires the same output in every format. It runs only whenASSEMBLY_DIFFER_REFERENCEnames the other build's dll. Against the build from #67, 3000 seeds came out the same. With the visibility quirk removed on purpose, 24 of 300 failed.Real packages
Both builds diffed seven real package upgrades from nuget.org in
xmlandgithub-comment, with the same output: Proc, NuGet.Versioning, Newtonsoft.Json, System.Text.Json, Microsoft.Extensions.DependencyInjection.Abstractions, CsCheck and System.Collections.Immutable. The native-AOT build publishes without trimming or AOT warnings, and./build.sh smokeaotpasses.Verify
Out of scope: The engine lives in the tool's assembly and its types are public, because the exporters are. A separate library package comes with the snapshot package, after the API settles. The tool's own API diff against its last release reports
Major, because that assembly's public types moved. It is a tool, not a library, so nothing references them.Stack: 2 of the dusting-off series, on top of #67.
🤖 Generated with Claude Code