Skip to content

Retire the public-API doc and its dead analyzer settings - #835

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
chore/retire-public-api-doc
Aug 9, 2026
Merged

Retire the public-API doc and its dead analyzer settings#835
Rafael-SOWNet merged 1 commit into
masterfrom
chore/retire-public-api-doc

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Collaborator

AGENTS.md carried a standing note:

Docs/Contributing/RS1617Errors.md is the one exception: it describes adding public members to a PublicApi.*.txt, and neither those files nor the analyzer that wanted them are in the tree any more. Do not follow it; delete or rewrite it if you are in there anyway.

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 into coding_rules.md beside 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 and PublicApi.*.txt goes.

Two dead settings go with it. Sources/.editorconfig set RS0016 and RS0017 to error. The Microsoft.CodeAnalysis.PublicApiAnalyzers package 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.

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>
@Rafael-SOWNet
Rafael-SOWNet merged commit 2006af8 into master Aug 9, 2026
25 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant