Skip to content

Add PublicApi analyzer to SortingNetworks class library#109

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers/setup-publicapi-analyzer
May 3, 2026
Merged

Add PublicApi analyzer to SortingNetworks class library#109
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers/setup-publicapi-analyzer

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Owner

Track the public API surface of the SortingNetworks class library so that accidental breaking changes are caught at build time, matching the setup used in jonathanpeppers/dotnes.

What changed:

  • Added Microsoft.CodeAnalysis.PublicApiAnalyzers 3.3.4 as a PrivateAssets="all" dependency
  • Created PublicAPI.Shipped.txt (empty -- nothing shipped yet)
  • Created PublicAPI.Unshipped.txt with all current public APIs (SortingNetworkAttribute, its constructor, and its two properties)

The build passes clean with 0 warnings and 0 errors.

Add Microsoft.CodeAnalysis.PublicApiAnalyzers 3.3.4 with all existing
APIs listed in PublicAPI.Unshipped.txt.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 3, 2026 02:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds build-time public API tracking to the SortingNetworks package so accidental breaking changes to its intentionally small public surface are caught during development. In the context of this repo, that safeguards the class-library side of the package while the bundled source generator remains implementation detail.

Changes:

  • Added Microsoft.CodeAnalysis.PublicApiAnalyzers as a private build dependency for the SortingNetworks project.
  • Added PublicAPI.Unshipped.txt enumerating the current public API surface of SortingNetworkAttribute.
  • Added an initial empty PublicAPI.Shipped.txt baseline for future releases.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
SortingNetworks/SortingNetworks.csproj Adds the Public API analyzer package to enforce API surface tracking at build time.
SortingNetworks/PublicAPI.Unshipped.txt Records the current unshipped public APIs for SortingNetworkAttribute.
SortingNetworks/PublicAPI.Shipped.txt Initializes the shipped API baseline file required by the analyzer.

@jonathanpeppers jonathanpeppers merged commit 5cefb0a into main May 3, 2026
10 checks passed
@jonathanpeppers jonathanpeppers deleted the jonathanpeppers/setup-publicapi-analyzer branch May 3, 2026 02:34
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.

2 participants