Thanks to visit codestin.com
Credit goes to github.com

Skip to content

build: lock the API surface against the 1.0.0 baseline#10

Merged
diomonogatari merged 1 commit into
mainfrom
chore/enable-packagevalidation-baseline
Jun 5, 2026
Merged

build: lock the API surface against the 1.0.0 baseline#10
diomonogatari merged 1 commit into
mainfrom
chore/enable-packagevalidation-baseline

Conversation

@diomonogatari

Copy link
Copy Markdown
Owner

Summary

Follow-up to the 1.0.0 release: now that BitbucketServer.Net 1.0.0 is 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 (CP0002 etc.). Intentional breaks are acknowledged via a suppression file (/p:ApiCompatGenerateSuppressionFile=true) or a major-version bump + new baseline.
  • In-repo dev version → 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.
  • CI now runs dotnet pack so the baseline check fails at PR time, not only at release.

Verified

  • Negative test: demoting a protected member (GetBaseUrl) failed pack with CP0002 on both net8.0 and net10.0 — the lock genuinely bites.
  • Positive: the unchanged 1.0.1 surface validates clean against the published 1.0.0.
  • 767 tests pass on both TFMs; format gate clean.

No release here — just hardening the pipeline for everything after 1.0.0.

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.
@diomonogatari diomonogatari merged commit 7664fed into main Jun 5, 2026
1 check passed
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