Skip to content

fix(deps): remove duplicate lockfile entries that break cargo on main - #2209

Merged
robcohen merged 2 commits into
mainfrom
fix/lockfile-duplicate-entries
Aug 31, 2026
Merged

robcohen merged 2 commits into
mainfrom
fix/lockfile-duplicate-entries

Conversation

@robcohen

Copy link
Copy Markdown
Member

main is currently red for every PR. Cargo.lock lists wasm-encoder 0.258.0 and wasmparser 0.258.0 twice each, and cargo 1.97 refuses the file:

error: failed to parse lock file at: .../Cargo.lock
Caused by:
  package `wasm-encoder` is specified twice in the lockfile

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 lists hashbrown 0.17.1 among 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 metadata accepts 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.

check result
cargo +1.97.0 metadata succeeds (was exit 101)
cargo +1.97.0 build --workspace clean
cargo test --workspace 0 failing suites
cargo +1.97.0 clippy --workspace --all-targets clean
wasip2 component build clean

Found 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

`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.
Copilot AI lite review requested due to automatic review settings August 31, 2026 17:32
@robcohen
robcohen requested a review from a team as a code owner August 31, 2026 17:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

✅ Compatibility Test Results

Metric Result
Check Compatibility 100%
BQL Compatibility 100% (raw 93%, 170 masked)
Full AST Match 100%
Total Files 811
What's tested
  • Check: Exit codes and error counts match bean-check
  • BQL: Query results match bean-query
    The headline is the EFFECTIVE rate, after pairs where beanquery
    itself is wrong are masked. raw is the same run with nothing
    masked. A widening gap means the registry grew, not that rledger
    changed.
  • Files: ~800 test files downloaded from 10+ beancount repositories

Full results available in workflow artifacts

@robcohen
robcohen merged commit 78be7da into main Aug 31, 2026
50 of 53 checks passed
@robcohen
robcohen deleted the fix/lockfile-duplicate-entries branch August 31, 2026 18:36
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