Skip to content

fix(ci): bump cargo-semver-checks to 0.50.0 for rustdoc JSON v60 - #709

Closed
Adomas Bekeras (AdomasBekeras) wants to merge 1 commit into
mainfrom
u/abekeras/fix-anvil-semver-checks-pin
Closed

fix(ci): bump cargo-semver-checks to 0.50.0 for rustdoc JSON v60#709
Adomas Bekeras (AdomasBekeras) wants to merge 1 commit into
mainfrom
u/abekeras/fix-anvil-semver-checks-pin

Conversation

@AdomasBekeras

@AdomasBekeras Adomas Bekeras (AdomasBekeras) commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Problem

anvil-semver-check fails for every library crate on every PR:

error: unsupported rustdoc format v60 for file: .../target/doc/anyspawn_azure.json
(supported formats are v55, v56, v57)

justfiles/anvil/versions.just pinned cargo-semver-checks 0.46.0, which reads rustdoc JSON v55/v56/v57. The recipe does not pin a stable toolchain, so it uses the runner default — now Rust 1.98.0, whose rustdoc emits v60. The tool aborts while parsing the JSON it just produced.

The recipe is advisory, so the crash was not surfaced as a failure. Instead each tool error was collected as a "finding" and posted as a sticky ⚠️ Potential breaking changes detected comment listing ~21 crates. Net effect: SemVer checking has been off repo-wide, and every PR carried a misleading breaking-change warning. Example: #705.

Fix

Bump the pin to 0.50.0, whose trustfall_rustdoc features are v57, v60, v61.

constants.env (used by the main.yml semver job and scripts/release-packages.ps1) is bumped to the same version. That job pins RUST_LATEST=1.96.1, which emits v57, so it was not broken — but 0.48.0 reads only v56/v57, so a developer running release-packages.ps1 on current stable would hit the identical error locally.

Compatibility

Measured format_version per toolchain:

toolchain rustdoc JSON
1.93.1 (MSRV) v57
1.95.0 v57
1.96.1 (RUST_LATEST) v57
1.97.0 v57
1.98.0 (runner stable) v60
nightly-2026-05-30 v57

0.50.0 covers v57 and v60, so every toolchain in play works. It drops v56, which corresponds to rustc below our MSRV. Install MSRV of 0.50.0 is Rust 1.93, which the repo already meets.

Verified locally with 0.50.0 under 1.98.0:

$ cargo semver-checks --package allocation_hints --baseline-rev origin/main
     Checked [   0.021s] 196 checks: 196 pass, 58 skip
     Summary no semver update required

The summary wording is unchanged, so ConvertFrom-SemverChecksOutput in scripts/lib/releasing.ps1 still parses it. just anvil-semver-check-validate-prereqs passes.

Expected side effects

Versions 0.47 through 0.50 added new lints, which has two consequences.

First, the advisory comment will now report breaking changes that 0.46.0 was never able to detect, so it may look busier than it used to. That is the point of the fix, but the first few pull requests after this merges will probably carry longer comments than usual.

Second, release-packages.ps1 derives each crate's change type from the same tool, so a crate whose release would previously have been classified as a patch may now be classified as breaking. Both outcomes are the tool working correctly rather than a regression, but they are new behaviour and worth expecting rather than being surprised by.

Follow-ups (not in this PR)

  • The pin will drift again: the recipe tracks whatever stable the runner ships, while the tool supports a discrete set of format versions. Either pin a toolchain for this recipe or expect a periodic bump.
  • anvil-semver-check renders a tool crash identically to a real finding. A parse or build failure should be reported as an operational problem, not as "potential breaking changes".
  • justfiles/anvil/versions.just is anvil-managed; the same pin should be bumped in the cargo-anvil template so other adopting repos are not left broken.

Copilot AI lite review requested due to automatic review settings August 28, 2026 11:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the repository’s pinned cargo-semver-checks version so SemVer checking continues to work with newer rustdoc JSON format versions (notably v60 from newer stable toolchains), avoiding tool parse errors being misreported as “potential breaking changes”.

Changes:

  • Bump cargo-semver-checks pin in anvil just recipes to 0.50.0.
  • Bump the workspace-wide CARGO_SEMVER_CHECKS_VERSION in constants.env to 0.50.0 to keep CI/release tooling aligned.

Reviewed changes

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

File Description
justfiles/anvil/versions.just Updates the anvil tool pin for cargo-semver-checks to 0.50.0.
constants.env Updates CARGO_SEMVER_CHECKS_VERSION to 0.50.0 for CI/release script usage.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (356dc63) to head (c203496).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #709   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         563      563           
  Lines       61068    61068           
=======================================
  Hits        61068    61068           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

cargo_mutants_version := "26.1.2"
cargo_nextest_version := "0.9.122"
cargo_semver_checks_version := "0.46.0"
cargo_semver_checks_version := "0.50.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it should be done in cargo-anvil

Managed by cargo-anvil. Update the corresponding template in the cargo-anvil

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ugh

The anvil-semver-check recipe pinned cargo-semver-checks 0.46.0, which
reads rustdoc JSON v55/v56/v57. GitHub runners now ship Rust 1.98.0,
whose rustdoc emits v60, so the tool aborted while parsing the JSON it
had just generated. Because the recipe is advisory, every failure was
rendered as a "Potential breaking changes detected" sticky comment
listing each library crate, so SemVer checking was effectively off and
every PR carried a misleading warning.

0.50.0 reads v57, v60 and v61, covering both the runner's stable and the
1.96.1 toolchain the main.yml semver job pins. Bump constants.env to the
same version so the release scripts and the anvil recipe agree.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AdomasBekeras
Adomas Bekeras (AdomasBekeras) force-pushed the u/abekeras/fix-anvil-semver-checks-pin branch from 8eff2f0 to c203496 Compare August 28, 2026 14:29
Copilot AI review requested due to automatic review settings August 28, 2026 14:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

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.

3 participants