fix(release): use scalar Cargo package versions - #162
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes release-please Rust workspace version updates by switching both workspace members (cortex and xtask) from inherited version.workspace = true to explicit scalar [package].version strings, which release-please@17.3.0 requires. It also strengthens repository “workflow shape” tests and version-carrier tracking so future changes can’t reintroduce the unsupported inherited-version structure.
Changes:
- Move the canonical version to
Cargo.tomlroot[package].versionand setxtask’s[package].versionexplicitly. - Extend
release/components.tomlto trackxtask/Cargo.tomland thextaskentry inCargo.lockas synchronized version carriers. - Add a structural contract test that enforces scalar/equal package versions and forbids
workspace.package.version.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
Cargo.toml |
Switch cortex to scalar [package].version and remove workspace.package.version to satisfy release-please Rust updater constraints. |
xtask/Cargo.toml |
Set xtask to an explicit scalar version synchronized with the root package. |
release/components.toml |
Add xtask manifest + lockfile entry as tracked version carriers for cargo xtask version-sync tooling. |
tests/workflow_shapes.rs |
Add a contract test enforcing scalar/equal workspace member versions and preventing workspace.package.version from returning. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Problem
The corrected Release Please workflow still failed after #158 and #161:
3075160581991506519418value at path package.version is not taggedThe npm JSON updater was no longer the failing path. Release Please reached the Rust workspace update, fetched
xtask/Cargo.toml, and failed because both rootcortexandxtaskusedversion.workspace = true. Release Please 17.3.0 requires scalar[package].versionvalues when its Rust updater rewrites each workspace member. Itscargo-workspaceplugin also requires package versions to be strings, so the inherited form is unsupported by both paths.Fix
3.11.1version from[workspace.package]into root[package].versionxtaskan explicit synchronized[package].versionxtask/Cargo.tomland thextaskCargo.lock entry inrelease/components.tomlworkspace.package.versionVerification
cortexandxtaskto 3.11.1cargo xtask check-version-sync: 16 carriers in synccargo xtask check-release-versions: 16 carriers in syncrelease-please@17.3.0 release-pr --dry-runexited 0Would open 1 pull requestsThe decisive post-merge verification is a green
release-pleasejob onmain, followed by a successfulrelease-pr-fixupwhen applicable.