Repository navigation
fix(deps): remove duplicate lockfile entries that break cargo on main - #2209
Merged
Merged
Conversation
`Cargo.lock` on main lists `wasm-encoder 0.258.0` and
`wasmparser 0.258.0` twice each. Cargo 1.97 refuses the file outright:
error: failed to parse lock file at: .../Cargo.lock
Caused by:
package `wasm-encoder` is specified twice in the lockfile
Anything that reads metadata therefore fails on main and on every PR
merged with it -- Code Coverage, Cargo Deny, MSRV, Build Package, LSP,
and the benchmark job all go red for a reason none of them state
clearly, which is why this looked like several unrelated failures.
The cause is concurrent dependency bumps. Two of #2203 through #2207
each added the same stanza at a different position, so git merged both
without a conflict; neither PR's own CI could see it, because neither
contained the other's line.
The `wasm-encoder` pair is byte-identical, so one goes. The `wasmparser`
pair is not: same version and checksum, but one lists `hashbrown 0.17.1`
among its dependencies and the other does not -- the two halves of a
feature resolution merged together. The superset is kept, and cargo
accepts the result without rewriting a single further byte, which is the
evidence that it is the right half rather than an assumption.
Nothing but deletions: 21 lines, no version moves.
Verified against cargo 1.97 (CI's toolchain, not the 1.96 in the nix
shell, which parses the broken file happily -- the same skew that hid a
clippy lint for five commits): `cargo metadata` succeeds, the workspace
builds, the full test suite passes, and the wasip2 component builds.
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
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.
main is currently red for every PR.
Cargo.locklistswasm-encoder 0.258.0andwasmparser 0.258.0twice each, and cargo 1.97 refuses the file:Anything that reads metadata fails — Code Coverage, Cargo Deny, MSRV, Build Package, LSP, PR Benchmark. None of them names the lockfile in its check title, which is why it presents as several unrelated failures rather than one cause.
Where it came from
Concurrent dependency bumps. Two of #2203–#2207 each added the same stanza at a different position, so git merged both without a conflict. Neither PR's own CI could have caught it, because neither branch contained the other's line — the corruption exists only in the merge.
The fix
wasm-encoder: the two entries are byte-identical. One goes.wasmparser: they are not identical. Same version and checksum, but one listshashbrown 0.17.1among its dependencies and the other does not — two halves of a feature resolution merged together. The superset is kept.That choice is checked rather than assumed: after the edit,
cargo metadataaccepts the file without rewriting a single further byte. Had I kept the wrong half, cargo would have re-resolved and the diff would show it.21 deletions, no additions, no version moves.
Verification
Against cargo 1.97 — CI's toolchain, not the 1.96 in the nix shell, which parses the broken file happily. That skew is why this reproduces in CI and not locally, and it is the same trap that hid a clippy lint here for five commits.
cargo +1.97.0 metadatacargo +1.97.0 build --workspacecargo test --workspacecargo +1.97.0 clippy --workspace --all-targetsFound while investigating why #2200's required check went red; that PR touches six files, none of them the lockfile.
🤖 Generated with Claude Code
https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr