Repository navigation
fix(release): stamp Cargo.toml's version from the release tag - #83
Merged
Merged
Conversation
The first fork RC published as fork-dev-0.1.0-rc.9 and shipped: rtk-0.42.4-1.x86_64.rpm rtk_0.42.4-1_amd64.deb Cargo.toml on develop carries whatever release-please last wrote on master, and nothing updates it for an RC — so `rtk --version` reports 0.42.4, telemetry records 0.42.4, and both packages are named for it. Upstream behaves identically (their dev-0.44.2-rc.344 ships the same 0.42.4 filenames), but for a fork it is worse than cosmetic: our artifact's name and version are byte-identical to upstream's own RC artifact, so two different binaries share one package identity. The fork- tag prefix was chosen precisely to prevent that, and the packages were left colliding. CARGO_PKG_VERSION feeds --version, telemetry, cargo-deb and cargo-generate-rpm, so stamping it once before each build fixes all four. Verified rather than assumed: - all five tag forms derive correctly (scripts/version-from-tag.sh --test) - the stamp rewrites only line 3; clap = "4" and serde = "1" are untouched - cargo metadata reports `rtk 0.1.0-rc.9`, so cargo accepts the prerelease form - no workflow uses --locked, so the stale lockfile self-heals during the build - the deb/rpm asset paths are not version-templated Not verified locally: the resulting .deb/.rpm filenames, which need cargo-deb on Linux. The next RC's published assets will show them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 of 3 tasks
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.
The first fork RC published as
fork-dev-0.1.0-rc.9and shipped:Cargo.tomlondevelopcarries whatever release-please last wrote onmaster, and nothing updates it for an RC. Sortk --versionreports0.42.4, telemetry records0.42.4, and both packages are named for it.Why this matters more for a fork
Upstream behaves identically — their
dev-0.44.2-rc.344ships the samertk_0.42.4-1_amd64.debfilename. For them it's confusing. For us it's a collision: our artifact's name and version are byte-identical to upstream's own RC artifact, so two different binaries share one package identity. Thefork-tag prefix exists precisely to prevent that, and the packages were left colliding.Fix
CARGO_PKG_VERSIONfeeds--version, telemetry,cargo-deb, andcargo-generate-rpm. Stamping it once before each build fixes all four, rather than patching each consumer.fork-dev-0.1.0-rc.9→0.1.0-rc.9, which is valid semver.Verified
Not verified locally: the resulting
.deb/.rpmfilenames — that needscargo-debon Linux. The next RC's published assets will show them, and that's the check worth watching after merge.Classification
Original fix, not Fork Infrastructure — upstream has the same bug and can hold the fix. The Upstream PR is deferred by maintainer decision to avoid flooding upstream while the benchmark PR is in review. Recorded as owed in
CONTEXT.mdunder "Deferred Upstream PRs" and tracked separately, so it does not silently become permanent divergence.Deliberately not done
Renaming the package to
rtk-fork. It would fix identity but break the drop-in-replacement property that is the fork's whole pitch — a visitor should install this instead of rtk, not alongside it.