Retire the public-API doc and its dead analyzer settings - #835
Merged
Conversation
AGENTS.md carried a standing note that RS1617Errors.md describes adding public members to a PublicApi.*.txt, that neither those files nor the analyzer wanting them are in the tree, and to delete or rewrite it when in there anyway. This is that. The half of it that is still true -- anything added for the library's own purposes is not public -- moves into coding_rules.md beside the other two rules of its kind, with a note that nothing enforces it any more, so it reads as a rule to follow rather than one to be caught by. The half about RS0016 and PublicApi.*.txt goes. Sources/.editorconfig set RS0016 and RS0017 to error. The Microsoft.CodeAnalysis.PublicApiAnalyzers package that raises them is referenced nowhere, so those two lines have been configuring an analyzer that is not installed; they go too. The contributor index pointed at the deleted file as item 5 and now points at coding_rules.md, which had no entry at all despite being the file AGENTS.md sends people to for the sealed-or-abstract rule. Docs and build configuration only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 9, 2026
Rafael-SOWNet
added a commit
that referenced
this pull request
Aug 9, 2026
Removing a public member breaks every consumer at compile time, and adding one is a promise that has to be kept for the rest of the major version. Neither shows up in a test run: the suite only calls the API it knows about, so a member that vanishes takes its own tests with it and the summary line stays green. RS0016/RS0017 used to cover this. #835 retired the settings -- they were dead, and that was right -- but the guarantee went with them, and 2.0 is the release where its absence costs the most. This restores it without the analyzer package: the surface is measured by reflection and compared against Common/PublicApi.txt, 2602 members. A difference fails with both lists spelled out, headed by which direction it went. To accept an intended change, run once with AM_UPDATE_PUBLIC_API=1 and commit the result. The diff is then part of review, which is the point -- the file is not a chore to keep in sync, it is the record of what was promised and when. Protected members count. A consumer can derive, so they are as much a promise as a public one. One assembly, one framework. The surface genuinely differs per target -- the generic-math members are net7.0 and later only -- so this pins the framework the tests run on and claims nothing about netstandard2.0. Checked against a member added on purpose, since a guard that cannot fail is worse than none: ADDED -- a promise for the rest of the major version (1): AngouriMath.MathS.CanaryDoNotShip(AngouriMath.Entity) : AngouriMath.Entity The baseline it records is the surface as it stands, so this commit asserts nothing about whether that surface is right. What it did establish on the way in: comparing 2.0 against the 1.4.0 package finds 34 removals, and all 34 are already named in BREAKING-CHANGES.md. Runs in 13 ms. Tests: 6050 passing, 0 failed, 14 skipped. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
AGENTS.md carried a standing note:
This is that, done as part of the 2.0 tidy-up.
The half that is still true moves rather than dies. "Anything added for the library's own purposes is not
public" goes intocoding_rules.mdbeside the other two rules of its kind — with the note that nothing enforces it any more, so it reads as a rule to follow rather than one to be caught by. The half about RS0016 andPublicApi.*.txtgoes.Two dead settings go with it.
Sources/.editorconfigsetRS0016andRS0017to error. TheMicrosoft.CodeAnalysis.PublicApiAnalyzerspackage that raises them is referenced nowhere in the tree, so those lines have been configuring an analyzer that is not installed.The index gains an entry it was missing. It pointed at the deleted file as item 5; it now points at
coding_rules.md, which had no entry at all despite being where AGENTS.md sends people for the sealed-or-abstract rule.Docs and build configuration only — the solution builds unchanged.