Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Cargo.lock from Git #29

Closed
wants to merge 1 commit into from
Closed

Remove Cargo.lock from Git #29

wants to merge 1 commit into from

Conversation

GabrielMajeri
Copy link
Contributor

According to the Cargo book FAQ libraries should not check-in their Cargo.lock file.

@est31
Copy link
Member

est31 commented Aug 27, 2018

Thanks for your diligence! You are right, it's indeed the recommendation to not commit Cargo.lock into git. Let me explain why despite this, lewton still has a Cargo.lock.

Some time ago, I wanted to test how well some older rustc version was performing.
So I checked out some older version of my library, and tried to run the benchmark tool. Of the time when that older version was the most recent commit, this would have worked flawlessly. But since then, my Cargo.lock had been updated, and my dependencies needed newer rustc versions! This put me before a problem: I couldn't even test my own library! Sadly, Cargo doesn't have time travel support, nor does it resolve crates based on the required rustc version, skipping crates that need a too new rustc. I ended having to do a very laborious hack with cloning the index, checking out a commit from that time, and pointing cargo to be using it.

Until one of the two things (time travel support or MSRV used for resolution) is being supported for a long enough time, I think I'll keep Cargo.lock.

@est31 est31 closed this Aug 27, 2018
@GabrielMajeri GabrielMajeri deleted the no-cargo-lock branch August 27, 2018 12:45
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.

2 participants