Repository navigation
Keep the libraries' public API in api/ and verify it in CI - #99
Merged
Merged
Conversation
api/ holds Nullean.PublicApi's and Nullean.PublicApi.Diff's public API as .api files, written by the tool built from this checkout; Nullean.PublicApi has one per target framework, because on netstandard2.0 the records' <Clone>$ cannot return the derived type. The ci target now runs verifyapi, which fails when the build no longer matches them, and `mise run api` regenerates them after an intended change. The update command api --verify prints now carries the --project, --include-tests and --include-unpackable options it was run with. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 libraries now use their own feature.
api/holds the public API ofNullean.PublicApiandNullean.PublicApi.Diffas.apifiles, written by the tool built from this checkout. So from now on, a change to either library's API shows up in its pull request as a diff of those files.Nullean.PublicApi: its API differs between netstandard2.0 and net10.0. Covariant return types need .NET 5 or later, so on netstandard2.0 the records'<Clone>$returns the base type (public override ApiTypeReference <Clone>$()instead ofpublic override ApiArrayType <Clone>$()). Generating these files is how Read a covariant return override as an override #98 was found../build.sh ciand CI's build job runverifyapi: CI calls the targets one by one, soverifyapiis its own step there, and the run on this branch printed[api] api matches the build: 3 fileson Linux. The target fails when the build no longer matchesapi/.mise run apiregenerates the files after an intended change, and AGENTS.md says to commit them with that change. CI runs the tool from the checkout, because the releasedverify-apiaction can't runapiuntil the next release.--verifyprints now carries the--project,--include-testsand--include-unpackableoptions it was run with.Checked locally:
verifyapipasses on this branch. With a public method added toApiWriterit fails with exit 5:🤖 Generated with Claude Code