Skip to content

Validate package API against the latest release#445

Merged
horgh merged 2 commits into
enable-package-validationfrom
greg/stf-55-breaking-changes-are-detected-on-net-repos
Jul 23, 2026
Merged

Validate package API against the latest release#445
horgh merged 2 commits into
enable-package-validationfrom
greg/stf-55-breaking-changes-are-detected-on-net-repos

Conversation

@oschwald

@oschwald oschwald commented Jul 22, 2026

Copy link
Copy Markdown
Member

What

Set PackageValidationBaselineVersion to 6.1.0 (the latest published release) in MaxMind.MinFraud.csproj, and update dev-bin/release.sh to bump the baseline to the new version right after tagging a release.

Why

EnablePackageValidation on its own (#429) only runs the compatible-TFM validators; it does not compare the package against the previously published release, so an accidental breaking API change still packs successfully. With PackageValidationBaselineVersion set, dotnet pack downloads the baseline package from NuGet and fails on binary- or source-incompatible changes. Since the release workflow runs dotnet pack on every pull request, accidental breaking changes are caught in CI (STF-55).

The baseline is bumped after tagging so that pull requests are always validated against the latest published release, while the tagged commit itself is validated against the release it replaces (the new version is not yet on NuGet when the release build packs). One caveat: packs that run in the few minutes between tagging and the package becoming downloadable from NuGet can fail transiently; a re-run fixes them.

This is the follow-up discussed in #429: MaxMind.MinFraud 6.1.0 has since been published, so there is now a real baseline to validate against.

Verified locally: making Warning.Code internal fails dotnet pack with CP0002 against the 6.1.0 baseline for every TFM, and the unmodified branch packs cleanly. Intentional breaking changes (e.g., for a future major release) can be recorded with dotnet pack /p:ApiCompatGenerateSuppressionFile=true.

This PR is stacked on #429 (base branch enable-package-validation).

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ca93c3cf-47da-4f1b-b060-426d34d4cfab

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch greg/stf-55-breaking-changes-are-detected-on-net-repos

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

oschwald and others added 2 commits July 22, 2026 21:32
Without a baseline version, package validation only runs the
compatible-TFM validators; it does not compare the package against the
previously published release, so an accidental breaking API change
still packs successfully.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bumping the baseline to the new version after the tag is created keeps
pull requests validated against the latest published release, while the
tagged commit itself is still validated against the release it
replaces. Bumping before tagging would not work: the new version is not
on NuGet when the release build packs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@oschwald
oschwald force-pushed the greg/stf-55-breaking-changes-are-detected-on-net-repos branch from 7f129a1 to 9f05226 Compare July 22, 2026 21:32
@horgh
horgh merged commit d097fe8 into enable-package-validation Jul 23, 2026
9 checks passed
@horgh
horgh deleted the greg/stf-55-breaking-changes-are-detected-on-net-repos branch July 23, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants