Repository navigation
Conversation
There were no tests, so nothing showed what a change to the engine, the exporters or the CLI does to their output. The tests run the built tool on assemblies compiled from C# source and keep its output as snapshots; CsCheck properties cover generated APIs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mpdreamz
added a commit
that referenced
this pull request
Nov 14, 2026
…#68) The comparison now runs on a port of JustAssembly onto System.Reflection.Metadata, so `src/assembly-differ/lib` and 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 `diff` command must keep behaving the same, so the old engine's output is the specification. ## Why The dlls in `lib` came from the unmerged `public-types` branch of [nullean/JustAssembly](https://github.com/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 `ReferenceTests` runs this build and another one on further generated versions and requires the same output in every format. It runs only when `ASSEMBLY_DIFFER_REFERENCE` names the other build's dll. Against the build from [#67](#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 `xml` and `github-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 smokeaot` passes. ## Verify ```bash mise run test # compare with the build from main, on 1000 generated versions git worktree add /tmp/ad-main origin/main && (cd /tmp/ad-main && dotnet build src/assembly-differ -c Release -f net11.0) ASSEMBLY_DIFFER_REFERENCE=/tmp/ad-main/src/assembly-differ/bin/Release/net11.0/assembly-differ.dll ASSEMBLY_DIFFER_SEEDS=1000 \ dotnet test --project tests/assembly-differ.Tests -c Release --treenode-filter '/*/*/ReferenceTests/*' ``` **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](#67). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Mpdreamz
added a commit
that referenced
this pull request
Nov 14, 2026
…88) The tests use Nullean.Snapshots 0.12.2, and the workaround pin on Nullean.ScopedFileSystem is gone, because 0.12.2 depends on the fixed 0.7.2 itself. **Prompt summary:** Nullean.Snapshots was released with the ScopedFileSystem fix, so the pin added in [#67](#67) can go. ## What #### The bump `Nullean.Snapshots.AwesomeAssertions` and `Nullean.Snapshots.TUnit` move from 0.12.1 to 0.12.2. `Nullean.ScopedFileSystem` leaves `Directory.Packages.props` and the test project, and it still resolves to 0.7.2 through Nullean.Snapshots. `assembly-differ upgrades` in this repository listed these two as the only updates, with 0 breaking changes in what the tests use. ## Verify ```bash mise run test dotnet list tests/assembly-differ.Tests package --include-transitive | grep ScopedFileSystem # 0.7.2 ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) 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 repository gets its first tests: they run the built tool on assemblies compiled from C# source, keep what
diffprints and returns as snapshots, and check CsCheck properties over generated APIs.mise run testand CI's build job run them.Prompt summary: The tool is being dusted off: a new comparison engine, subcommands per source, first releases that do not fail, and pull request comments and labels. Every one of those steps changes code the
diffcommand depends on, so the first step is a test suite that shows whatdiffdoes today, wrong answers included.Why
There are no tests. The only checks are the native-AOT smoke test and the build diffing its own previous release. A change to the engine, an exporter or the CLI can change what other builds parse without anything failing.
What
Fixtures compiled from source
A test describes an old and a new version of a small library as C# source. Roslyn compiles both into
old/Lib.dllandnew/Lib.dll, deterministically, so the output is the same on every run. The tests start the net11.0 build of the tool as a process, the way the action, the container and other builds call it. That keeps them valid when the engine behind the CLI is replaced.Characterization snapshots
DiffCommandTestsdiffs eleven named kinds of change in every format, records the exit code for each--prevent-changelevel, and covers eight failure paths. Nullean.Snapshots keeps the results in.snapshots/. They record today's behaviour, including known bugs such as #56, where Markdown reports a deleted member as added. A later fix changes the snapshot on purpose.Properties over generated APIs
CsCheck generates small APIs and checks three properties: an API diffed with itself has no changes, removing anything public is Major, and swapping old and new turns additions into removals. A fourth property, that only adding is Minor, is skipped with a link to #58.
Build, mise and CI
./build.sh testbuilds and runs the tests,cicomposes it, andmise run testcalls it. CI's build job runs it on every trigger except a release, where main's run on the commit already ran it.global.jsonselects Microsoft.Testing.Platform as thedotnet testrunner.Verify
mise run testTo see that the tests can fail, break the engine and run them again: every snapshot of a removal changes, and the removal property fails.
Out of scope: The snapshots show bugs this pull request leaves alone, each for its own fix: an unchanged API fails
--prevent-change patchwith exit code4, thegithub-commentformat reports0 breaking change(s)next to changes it marks breaking, and the README's claim that a provider spec withoutdiffis read as a command name is wrong, becausediffis the default command.Risk:
Nullean.Snapshots0.12.1 bringsNullean.ScopedFileSystem0.7.1, which throwsTypeLoadExceptionwhen it loads.Directory.Packages.propspins 0.7.2 until aNullean.Snapshotsrelease depends on it.🤖 Generated with Claude Code