build: lock the API surface against the 1.0.0 baseline#10
Merged
Conversation
Now that 1.0.0 is published, set PackageValidationBaselineVersion=1.0.0 so every build is diffed against it — an accidental breaking change (a removed/changed member or a dropped target framework) fails the pack. Bump the in-repo dev version to 1.0.1 (the actual release version still comes from the tag). Add a pack step to CI so an API break fails at PR time, not only at release. Verified: demoting a protected member fails pack with CP0002 on both net8.0 and net10.0; the unchanged 1.0.1 surface validates clean against the published 1.0.0.
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.
Summary
Follow-up to the 1.0.0 release: now that
BitbucketServer.Net 1.0.0is on NuGet, turn it into the API baseline so future releases can't silently break consumers.Changes
PackageValidationBaselineVersion=1.0.0— every build now diffs its public/protected surface against the published 1.0.0. A removed/changed member, or a dropped target framework, fails the pack (CP0002etc.). Intentional breaks are acknowledged via a suppression file (/p:ApiCompatGenerateSuppressionFile=true) or a major-version bump + new baseline.1.0.1(PackageValidation needs the candidate to be higher than the baseline). The actual release version still comes from the git tag at publish time.dotnet packso the baseline check fails at PR time, not only at release.Verified
protectedmember (GetBaseUrl) failed pack withCP0002on both net8.0 and net10.0 — the lock genuinely bites.1.0.1surface validates clean against the published1.0.0.No release here — just hardening the pipeline for everything after 1.0.0.