Repository navigation
Commit Cargo.lock - #74
Merged
Merged
Conversation
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
force-pushed
the
commit-cargo-lock
branch
from
October 12, 2026 23:58
d3a2dad to
6b0383d
Compare
1 of 2 tasks
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.
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.
Summary
Cargo.lockis 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,ccand bindgen drive a C compiler and libclang in every build, which makes that likelier, andcchas had 21 releases since April.--locked(check,test,clippy, and each release target's build), so aCargo.tomlchange 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.increase-if-necessaryin place ofincrease. It updates the lock, and raises a requirement inCargo.tomlonly for a release the requirement doesn't allow.increasewas there only because there was no lock to update.INSTALLATION.mdsayscargo install --locked --git …, which builds with the versions the lock records.cargo auditchecks the committed versions, rather than those of a lock it generates itself.The lock
cargo generate-lockfileon the pinned 1.97.1 toolchain, so it records the newest versions thatCargo.tomlallows, the ones CI resolves today.cargo checkwould: it adds ruby-prism's 14 packages, at the versions Parse Ruby with Prism instead of lib-ruby-parser #73's CI built with (cc1.8.0, bindgen 0.72.1, ruby-prism 1.9.0), and drops lib-ruby-parser's 3. 242 packages.pks graphsubcommand (deterministic JSON dependency-graph export) #44 don't touch dependencies, so the lock doesn't affect them.Test plan
cargo check --locked,cargo clippy --locked --all-targets --all-features -- -Dwarningsandcargo testpass locally, after the rebase onto Parse Ruby with Prism instead of lib-ruby-parser #73.--locked.