fix(publish): stop test_util from requiring a crates.io version - #525
Merged
Conversation
Hoisting test_util into [workspace.dependencies] with a `version` made every crate's dev-dependency on it inherit that version, forcing cargo to verify a test_util v10.0.3 exists on crates.io during packaging. test_util is an internal test-helper crate that has never been published, so this broke `cargo publish`/`cargo package` for vergen-lib, vergen, vergen-git2, vergen-gitcl, and vergen-gix. Drop the version from the workspace dependency (keep path only, as it was pre-hoist) so it's stripped from published manifests again. Also mark test_util `publish = false` to make its internal-only status explicit and enforced, and drop its `readme = "README.md"` reference, which pointed at a file that has never existed and independently blocked packaging test_util directly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #525 +/- ##
==========================================
+ Coverage 98.02% 98.21% +0.18%
==========================================
Files 25 25
Lines 6492 6492
==========================================
+ Hits 6364 6376 +12
+ Misses 128 116 -12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Commit 9fd334c hoisted
test_util,vergen,vergen-gix, andvergen-libinto[workspace.dependencies]in the rootCargo.toml. Thetest_utilentry included aversion:Every crate's dev-dependency on
test_utilinheritsworkspace = true, so it also inherited thatversion. That forces cargo to verify atest_utilv10.0.3 exists on crates.io during packaging — buttest_utilis an internal test-helper crate that has never been published. This brokecargo package/cargo publishforvergen-lib,vergen,vergen-git2,vergen-gitcl, andvergen-gix:Separately,
test_util/Cargo.tomldeclaredreadme = "README.md", but that file has never existed, which independently blocked packagingtest_utildirectly.Fix
Cargo.toml: dropversionfrom thetest_utilworkspace-dependency entry, keeping onlypath(matches its pre-hoist, unversioned-path-dep shape, which cargo strips from published manifests).test_util/Cargo.toml: replacereadme = "README.md"withpublish = false, making its internal-only status explicit/enforced and dropping the dangling readme reference.vergen,vergen-lib, andvergen-gixstay hoisted in[workspace.dependencies]— they weren't actually broken; their--dry-runfailures were just "version 10.0.3 not yet published," which self-resolves once published in dependency order.