Skip to content

Commit Cargo.lock - #74

Merged
dduugg merged 1 commit into
mainfrom
commit-cargo-lock
Oct 13, 2026
Merged

dduugg merged 1 commit into
mainfrom
commit-cargo-lock

Conversation

@dduugg

@dduugg dduugg commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Cargo.lock is committed. pks is a binary, but its .gitignore, the one cargo generates for a library, ignored the lock. So every build, a release's included, resolved dependencies afresh, and a release could ship versions that no CI run had tried, with nothing in pks changed. Since Parse Ruby with Prism instead of lib-ruby-parser #73, cc and bindgen drive a C compiler and libclang in every build, which makes that likelier, and cc has had 21 releases since April.
  • CI builds with --locked (check, test, clippy, and each release target's build), so a Cargo.toml change without a matching lock fails, rather than updating the lock unseen. dist doesn't pass --locked, but a lock that CI has checked leaves it nothing to update.
  • Dependabot uses increase-if-necessary in place of increase. It updates the lock, and raises a requirement in Cargo.toml only for a release the requirement doesn't allow. increase was there only because there was no lock to update.
  • INSTALLATION.md says cargo install --locked --git …, which builds with the versions the lock records.
  • cargo audit checks the committed versions, rather than those of a lock it generates itself.

The lock

Test plan

@dduugg
dduugg requested a review from a team as a code owner October 12, 2026 23:45
pks is a binary, but Cargo.lock was ignored, as the .gitignore that
cargo generated for a library said to do. So each build, a release's
included, resolved dependencies afresh, and a release could ship
versions that no CI run had tried, with nothing in pks changed. Since
#73, `cc` and bindgen drive a C compiler and libclang in every build,
which makes that likelier, and `cc` has had 21 releases in six months.

CI now builds with `--locked`, so it fails when Cargo.toml and
Cargo.lock disagree rather than updating the lock unseen. dist doesn't
pass `--locked`, but a lock that CI has checked leaves nothing for it to
update. Dependabot updates the lock and raises a requirement in
Cargo.toml only for a release it doesn't allow, where before, with no
lock to update, it raised every requirement. `cargo install --locked`
builds from source with the same versions, and `cargo audit` checks
them rather than those of a lock it makes itself.
@dduugg
dduugg force-pushed the commit-cargo-lock branch from d3a2dad to 6b0383d Compare October 12, 2026 23:58
@dduugg
dduugg merged commit 62e0e45 into main Oct 13, 2026
22 checks passed
@dduugg
dduugg deleted the commit-cargo-lock branch October 13, 2026 00:15
dduugg added a commit that referenced this pull request Oct 13, 2026
For cargo, Dependabot accepts only `auto` and `lockfile-only` as a
versioning strategy, so it rejected the config's `increase`, and since
#74 its `increase-if-necessary`, and ran no updates. `auto`, the
default, already does what `increase-if-necessary` meant to: it updates
Cargo.lock, and raises a requirement in Cargo.toml only for a release
that the requirement doesn't allow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant