Skip to content

Remove Cargo.lock from Rust#4350

Merged
bensheldon merged 1 commit intogithub:mainfrom
figsoda:rust
Jan 9, 2025
Merged

Remove Cargo.lock from Rust#4350
bensheldon merged 1 commit intogithub:mainfrom
figsoda:rust

Conversation

@figsoda
Copy link
Contributor

@figsoda figsoda commented Sep 3, 2023

Reasons for making this change:

The Cargo team no longer have definitive suggestion on whether you should ignore Cargo.lock, and the previous description is now outdated.

Links to documentation supporting these rule changes:

https://blog.rust-lang.org/2023/08/29/committing-lockfiles.html
https://doc.rust-lang.org/nightly/cargo/faq.html#why-have-cargolock-in-version-control

@itslychee
Copy link

hopefully this will get merged soon

@spencewenski
Copy link

Any chance this or one of the other duplicate PRs (1, 2) can be merged soon?

@Alongazhar
Copy link

Alongazhar commented Jan 7, 2025 via email

@bensheldon
Copy link
Contributor

Thank you for the PR and linking the community discussion 🙇🏻

Closes #3472, #4427, #4469.

@bensheldon bensheldon merged commit ceea7ca into github:main Jan 9, 2025
@figsoda figsoda deleted the rust branch January 29, 2025 19:39
EliahKagan added a commit to EliahKagan/prodash that referenced this pull request Jan 11, 2026
It was the default not to commit lockfiles for library-only crates,
at the time `.gitignore` here was written. Since then, however:

- rust-lang/cargo#12382
- github/gitignore#4350

More importantly, tracking `Cargo.lock` helps in improving supply
chain security, in two ways:

1. A supply chain attack is less often immediately successful.
2. Further mitigations, such as dependency cooldown, can be used.
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.

5 participants