Skip to content

Rust: check in Cargo.toml with a literal version - #58

Draft
mlin wants to merge 1 commit into
mlin:mainfrom
Wid-L-Hacker:conrad/cargo-templating
Draft

mlin wants to merge 1 commit into
mlin:mainfrom
Wid-L-Hacker:conrad/cargo-templating

Conversation

@mlin

@mlin mlin commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Cargo.toml for the Rust binding was generated on every invocation by a shim stamping the version from git describe, so whether the committed Cargo.lock agreed with the manifest depended on which tags a checkout had; the v0.10.0 lock refresh needed special tag handling in CI.

This checks the manifest in with a literal version and deletes the shims and templates. Releases bump the version as an ordinary edit with the lock refresh. The smoke-test crate pins the published release it tests; release-smoke rewrites the pin to the version under test.

The crate's Cargo.toml was generated on every invocation by a
wrapper script that stamped the package version from the nearest
git tag. Check the manifest in directly, with the current release
version (0.10.0) as a literal, and call plain cargo at every call
site: CI, the CTest cargo_test, and the Dockerfile test stage
(which no longer needs the checkout's .git copied in just so the
wrapper could read the tag).

The crates.io smoke-test crate gets the same treatment: its
checked-in manifest pins the current published release exactly,
and the release smoke workflow rewrites that pin to the version
under test.

With the version a literal in the manifest, the committed
Cargo.lock's root entry agrees with it in every checkout, and a
release version bump is a deliberate manifest edit followed by a
lock refresh.

This branch has not been deployed

No deployments
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