Skip to content

Commit 972ab2d

Browse files
authored
fix(ci): commit Cargo.lock for reproducible builds (#1123)
## Summary - Remove `Cargo.lock` from `.gitignore` and commit it to the repo - Remove the `cargo generate-lockfile` step from CI audit job - Prevents spontaneous CI breakage when upstream crates publish new versions **Root cause:** `Cargo.lock` was gitignored, so CI generated a fresh lockfile each run via `cargo generate-lockfile`. When `python3-dll-a` 0.2.15 was published to crates.io, the fresh resolve picked it up but the cargo-vet exemption still listed 0.2.14 — breaking main without any code change. **Fix:** Committing `Cargo.lock` pins exact versions. Dependency bumps become explicit (`cargo update`) and show up in diffs, so cargo-vet exemptions can be updated in the same PR. ## Test plan - [x] `cargo vet --locked` passes locally - [ ] CI audit job passes without `generate-lockfile` step
1 parent 33e4d62 commit 972ab2d

File tree

4 files changed

+5726
-5
lines changed

4 files changed

+5726
-5
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ jobs:
5050
- name: Install Rust toolchain
5151
uses: dtolnay/rust-toolchain@stable
5252

53-
- name: Generate lockfile
54-
run: cargo generate-lockfile
55-
5653
- name: Security audit (cargo-audit)
5754
uses: rustsec/audit-check@v2.0.0
5855
with:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Rust
22
/target/
3-
Cargo.lock
43

54
# Environment
65
.env

0 commit comments

Comments
 (0)