Skip to content

Extract the engine into Nullean.PublicApi and Nullean.PublicApi.Diff - #93

Merged
Mpdreamz merged 1 commit into
mainfrom
public-api-libs
Nov 14, 2026
Merged

Mpdreamz merged 1 commit into
mainfrom
public-api-libs

Conversation

@Mpdreamz

Copy link
Copy Markdown
Contributor

The first step towards the public API files and snapshots: the reader and the comparison leave the tool and become two packages, both targeting netstandard2.0 and net10.0 (PolySharp for the language features on netstandard2.0).

  • Nullean.PublicApi: ApiReader.Read(path) and Read(stream) read an assembly's API into records (ApiAssembly, ApiType, ApiMethod, ...).
  • Nullean.PublicApi.Diff: ApiDiff.Compare from two paths or two models, VersionChange.Classify (was AssemblyComparison.Classify in the tool), UsedApi and UsageFilter.

The diff items' constructors are internal now, so the library alone builds them, and every public member has an XML doc. build.sh pack packs both packages and checks their strong names, so the next release publishes them with the tool.

Behaviour

The tool's reports are unchanged:

  • all 617 tests pass, including the corpus snapshots;
  • the 200 ReferenceTests match a build of main (ASSEMBLY_DIFFER_REFERENCE);
  • a changed report string made 63 tests fail, so the tests do catch report changes.

The tool's own API-change report says Major, because Differ.SuggestedVersionChange and the Differ.Engine types moved into the libraries. Nothing references the tool assembly, so this is labelled feature, for the new packages.

🤖 Generated with Claude Code

The reader and the comparison move out of the tool into two packages that target netstandard2.0 and net10.0:
Nullean.PublicApi reads an assembly's API into records (ApiReader.Read from a path or a stream), and
Nullean.PublicApi.Diff compares two of them (ApiDiff.Compare from paths or models), classifies a difference
(VersionChange.Classify, which was AssemblyComparison.Classify) and narrows a diff to what code uses.

The diff items keep their behaviour but are only built inside the library, every public member is documented,
and the build packs and validates both packages next to the tool. The tool's reports are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Mpdreamz Mpdreamz added the feature A new capability (minor bump) label Nov 14, 2026
@Mpdreamz
Mpdreamz merged commit 1cce536 into main Nov 14, 2026
6 of 7 checks passed
@Mpdreamz
Mpdreamz deleted the public-api-libs branch November 14, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A new capability (minor bump)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant