Upgrade PublicApiAnalyzers to 5.6.0 + reconcile PublicAPI manifest#194
Merged
Conversation
PublicApiAnalyzers 5.x properly analyzes record-generated members, which the dormant 3.3.4 did not. Bumping it (unblocking the Dependabot group bump in #192) surfaced RS0016 for the compiler-generated members of the AuditUser (record struct) and AuditValueColumn (record class) records — Equals/GetHashCode/ ==/!=/ToString/Deconstruct and, for the class, <Clone>$. Add those 15 members to Abstractions/PublicAPI.Unshipped.txt so the declared public-API surface matches the actual surface. Symbols taken verbatim from the analyzer output (including nullable-oblivious ~ prefixes, consistent across all TFMs). No runtime/API change — the members already shipped in v0.1.0; this only documents them. EntityFrameworkCore and TestKit.Xunit declare no records, so their manifests are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Upgrades Microsoft.CodeAnalysis.PublicApiAnalyzers to re-enable accurate public API surface tracking, and reconciles the Abstractions public API manifest to eliminate RS0016 noise caused by record-generated members.
Changes:
- Bump
Microsoft.CodeAnalysis.PublicApiAnalyzersfrom3.3.4→5.6.0in the threesrc/projects that reference it. - Add missing compiler-generated record members for
AuditUserandAuditValueColumntosrc/Wolfgang.AuditTrail.Abstractions/PublicAPI.Unshipped.txt.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Wolfgang.AuditTrail.TestKit.Xunit/Wolfgang.AuditTrail.TestKit.Xunit.csproj | Bumps PublicApiAnalyzers to 5.6.0 for the TestKit project. |
| src/Wolfgang.AuditTrail.EntityFrameworkCore/Wolfgang.AuditTrail.EntityFrameworkCore.csproj | Bumps PublicApiAnalyzers to 5.6.0 (scoped to net10.0). |
| src/Wolfgang.AuditTrail.Abstractions/Wolfgang.AuditTrail.Abstractions.csproj | Bumps PublicApiAnalyzers to 5.6.0 for Abstractions. |
| src/Wolfgang.AuditTrail.Abstractions/PublicAPI.Unshipped.txt | Records missing record-generated public members to satisfy analyzer baselines. |
This was referenced Jul 5, 2026
Closed
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.
Fixes the RS0016 flood that blocks the Dependabot group bump #192.
Root cause
Microsoft.CodeAnalysis.PublicApiAnalyzerswas effectively dormant at 3.3.4 (it didn't analyze record-generated members). #192's bump to 5.6.0 reactivated it, and it immediately flagged RS0016 for the compiler-generated members of theAuditUser(record struct) andAuditValueColumn(record class) records — the hand-maintainedPublicAPI.Unshipped.txtnever listed them.Change
PublicApiAnalyzers3.3.4 → 5.6.0 in the 3 src csproj (per-project ref; non-protected).Equals/GetHashCode/==/!=/ToString/Deconstruct, plus<Clone>$on the class) toAbstractions/PublicAPI.Unshipped.txt. Symbols verbatim from analyzer output,~-prefixes preserved, consistent across all TFMs.Verified all 3 src projects build Release-clean across every TFM with the analyzer active.
Relation to #192
Delivers the
PublicApiAnalyzersportion of the Dependabot group. The remaining #192 items (EF Core 8→9, SqlClient 6→7, BannedApiAnalyzers 4→5 in the protected Directory.Build.props) are separate decisions — handle after this lands.