Skip to content

chore(release): version crates independently to fix release-plz resolution#223

Merged
SebastianThiebaud merged 1 commit into
mainfrom
chore/release-plz-independent-versions
May 23, 2026
Merged

chore(release): version crates independently to fix release-plz resolution#223
SebastianThiebaud merged 1 commit into
mainfrom
chore/release-plz-independent-versions

Conversation

@SebastianThiebaud
Copy link
Copy Markdown
Contributor

Problem

The release-plz PR job fails with failed to select a version for the requirement tsoracle-yieldpoint = "^0.1.4" ... candidate versions found which didn't match: 0.2.0, aborting the release PR (example run).

Root cause

Three things collide: shared workspace versioning (version.workspace = true), the breaking fix(core)! (#221) bump that moves the shared version to 0.2.0, and caret-locked internal pins (^0.1.x). release-plz only rewrites the internal version requirements of crates it actually releases; it leaves unchanged leaf crates (tsoracle-yieldpoint, tsoracle-openraft-toolkit) out of the release set, so their inbound ^0.1.x pins are never rewritten — yet inheritance still drags those crates to 0.2.0. Pre-1.0 a minor bump is a breaking bump, so ^0.1.x cannot span 0.2.0 and cargo update fails.

Fix

Version the 12 publishable crates independently (drop version.workspace = true). Unchanged crates keep their version so their inbound pins keep resolving, while release-plz bumps and rewrites pins only for the crates that changed. This is release-plz's native versioning model. Non-published members (examples, benchmarks, tsoracle-tests) keep inheriting [workspace.package].version and are unaffected.

Verification

Reproduced and validated locally with release-plz 0.3.158: release-plz update resolves cleanly (no cargo update failure, Cargo.lock updates, inbound pins rewritten correctly), and cargo metadata parses the workspace. This release produces:

  • 0.2.0: tsoracle-proto, tsoracle-core, tsoracle-server, tsoracle-client, tsoracle-driver-openraft, tsoracle-driver-paxos, tsoracle-paxos-toolkit
  • 0.1.5: tsoracle-consensus, tsoracle-driver-file, tsoracle (bin)
  • 0.1.4: tsoracle-openraft-toolkit, tsoracle-yieldpoint

Note

Crate versions are no longer uniform across the workspace — each version now reflects that crate's actual change magnitude. Anyone assuming all tsoracle-* crates share a single version should be aware this no longer holds. Committed as chore(release): so it doesn't itself trigger spurious leaf-crate bumps; the existing breaking commit already drives the 0.2.0 release once this lands and the release PR (#195) re-runs.

@coveralls
Copy link
Copy Markdown

coveralls commented May 23, 2026

Coverage Report for CI Build 26343067504

Coverage increased (+0.03%) to 94.822%

Details

  • Coverage increased (+0.03%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 10680
Covered Lines: 10127
Line Coverage: 94.82%
Coverage Strength: 467282.02 hits per line

💛 - Coveralls

…ution

Shared workspace versioning (`version.workspace = true`) breaks release-plz
on any release that crosses a pre-1.0 minor boundary.

The breaking `fix(core)!` change bumps the shared version to 0.2.0, which
drags every crate -- including unchanged leaves like tsoracle-yieldpoint and
tsoracle-openraft-toolkit -- to 0.2.0 via inheritance. release-plz only
rewrites internal version requirements for crates it actually releases, and
it leaves the unchanged leaves out of the release set, so their inbound
`^0.1.x` pins are never rewritten. Pre-1.0 a minor bump is a breaking bump,
so `^0.1.x` cannot resolve against 0.2.0 and `cargo update` fails.

Versioning the 12 publishable crates independently lets unchanged crates keep
their version (so their inbound pins keep resolving) while release-plz bumps
and rewrites pins only for the crates that changed.

Verified with release-plz 0.3.158: the workspace resolves and this release
produces 0.2.0 (proto, core, server, client, driver-openraft, driver-paxos,
paxos-toolkit), 0.1.5 (consensus, driver-file, tsoracle), and 0.1.4
(openraft-toolkit, yieldpoint).

Note: crate versions are no longer uniform across the workspace.
@SebastianThiebaud SebastianThiebaud force-pushed the chore/release-plz-independent-versions branch from c7cb9e9 to 05ee1e4 Compare May 23, 2026 20:42
@SebastianThiebaud SebastianThiebaud merged commit 3084912 into main May 23, 2026
28 of 29 checks passed
@SebastianThiebaud SebastianThiebaud deleted the chore/release-plz-independent-versions branch May 23, 2026 20:58
This was referenced May 23, 2026
SebastianThiebaud added a commit that referenced this pull request May 24, 2026
* fix(proto): bump to 0.2.2 to republish the lifted leader-hint API

The published tsoracle-proto 0.2.1 (from release #233) predates the
leader-hint lift in #295, which added LEADER_HINT_TRAILER_KEY,
LeaderHintLookup, and decode_leader_hint to v1 under a refactor: prefix.
Because crates version independently and release_commits gates releases
to feat/fix/perf, that change never bumped proto's version — so the
crates.io 0.2.1 lacks those symbols.

tsoracle-server 0.2.3 already uses them, so cargo publish --verify built
the server tarball with the path dep stripped, resolved
tsoracle-proto ^0.2.1 to the stale registry 0.2.1, and failed to compile
(E0432/E0425), aborting the release.

Bumping to 0.2.2 (patch: additive, non-breaking; all consumers pin
^0.2.1 so they resolve to it with no cascade) gets a proto containing
the symbols published ahead of the dependent crates.

* docs(contributing): require feat/fix for library API additions, not refactor

Document the release-mechanics trap behind the proto 0.2.2 fix: adding
public API to a library crate is user-visible to dependent crates even
when the gRPC wire contract (the v1 proto package) is unchanged, so it
must use feat:/fix: rather than refactor:, which does not trigger a
release. Also correct the stale "version.workspace = true / lockstep"
claim — crates have versioned independently since #223 — and spell out
the release_commits prefix filter.
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.

2 participants