ci: every committed Cargo.lock is current #227
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/lockfiles-current"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A new workflow,
lockfiles, with one short job on thelinuxrunner.Why. The workspaces here depend on one another by path. A version bump in one leaves the lockfiles of its dependents behind, and nothing says so until a job that passes
--lockedfails on a change that never touched it. Stale locks have failed jobs this way repeatedly.What it does. For each directory that holds a tracked
Cargo.lock,scripts/check-lockfiles.shrunscargo update --workspace --locked: cargo resolves the workspace against its lock and fails if the lock would change. No crate is downloaded and nothing is built; a cold run over the whole tree takes about half a minute. A stale lock is named together with the command that regenerates it. A lock that could not be checked (no network, a manifest that does not parse) fails the run under its own heading, so it is never read as current.No
paths:filter. A filter on this forge matches the files of the push, not of the pull request, so a later push that touches no manifest would leave the head without a run of this check. The job is short enough to run on every push.One directory is skipped, with its reason in the script: the vendored crate under
jouledesk-rs/vendor, which cargo resolves against its parent workspace's lock. A skip entry that no longer names a lockfile fails the run.Evidence.
scripts/check-lockfiles-selftest.sh(run by the job) builds a scratch workspace and shows the check passes a current lock and fails four broken ones: a bumped path dependency, an added dependency, a missing lock, and a manifest that does not parse.check-workflow-concurrency.shpasses with the new workflow.🤖 Generated with Claude Code