Skip to content

fix(publish): stop test_util from requiring a crates.io version - #525

Merged
CraZySacX merged 1 commit into
masterfrom
fix/broken-publish
Aug 24, 2026
Merged

fix(publish): stop test_util from requiring a crates.io version#525
CraZySacX merged 1 commit into
masterfrom
fix/broken-publish

Conversation

@CraZySacX

@CraZySacX CraZySacX commented Aug 24, 2026

Copy link
Copy Markdown
Member

Problem

Commit 9fd334c hoisted test_util, vergen, vergen-gix, and vergen-lib into [workspace.dependencies] in the root Cargo.toml. The test_util entry included a version:

test_util = { version = "10.0.3", path = "test_util" }

Every crate's dev-dependency on test_util inherits workspace = true, so it also inherited that version. That forces cargo to verify a test_util v10.0.3 exists on crates.io during packaging — but test_util is an internal test-helper crate that has never been published. This broke cargo package/cargo publish for vergen-lib, vergen, vergen-git2, vergen-gitcl, and vergen-gix:

error: failed to prepare local package for uploading

Caused by:
  no matching package named `test_util` found
  location searched: crates.io index
  required by package `vergen-lib v10.0.3 (...)`

Separately, test_util/Cargo.toml declared readme = "README.md", but that file has never existed, which independently blocked packaging test_util directly.

Fix

  • Root Cargo.toml: drop version from the test_util workspace-dependency entry, keeping only path (matches its pre-hoist, unversioned-path-dep shape, which cargo strips from published manifests).
  • test_util/Cargo.toml: replace readme = "README.md" with publish = false, making its internal-only status explicit/enforced and dropping the dangling readme reference.

vergen, vergen-lib, and vergen-gix stay hoisted in [workspace.dependencies] — they weren't actually broken; their --dry-run failures were just "version 10.0.3 not yet published," which self-resolves once published in dependency order.

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>
@CraZySacX CraZySacX self-assigned this Aug 24, 2026
@CraZySacX CraZySacX added the dependencies Pull requests that update a dependency file label Aug 24, 2026
@CraZySacX
CraZySacX enabled auto-merge (squash) August 24, 2026 15:51
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.21%. Comparing base (9fd334c) to head (eaf29d0).
⚠️ Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CraZySacX
CraZySacX merged commit 26a1f84 into master Aug 24, 2026
112 checks passed
@CraZySacX
CraZySacX deleted the fix/broken-publish branch August 24, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant