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

Add Cargo.lock file #61

Closed
samford opened this issue Oct 27, 2019 · 5 comments
Closed

Add Cargo.lock file #61

samford opened this issue Oct 27, 2019 · 5 comments

Comments

@samford
Copy link

samford commented Oct 27, 2019

In the process of making changes to formulae in the Homebrew package manager, I noticed that fselect was one of a handful of Rust binary projects without a Cargo.lock file in version control. The Cargo book recommends the following (source):

If you’re building an end product, which are executable like command-line tool or an application, or a system library with crate-type of staticlib or cdylib, check Cargo.lock into git.

More information about the reasoning can be found in the "Why do binaries have Cargo.lock in version control, but not libraries?" section of the Cargo FAQ.

The Cargo.lock file helps package managers to keep builds reproducible, since cargo install simply uses the latest dependency versions unless the --locked flag is added to the command, in which case it will use the versions outlined in Cargo.lock. Without a Cargo.lock file, there's a chance that a dependency update will break the build sometime in the future, which is something I've already encountered with other Rust binary projects.

Would you please consider checking Cargo.lock into version control?

@Br1ght0ne
Copy link
Contributor

Besides that, things like nixpkgs need Cargo.lock to ensure integrity. Im my PR for fselect I used a patch, but having it upstream is much better.

jhspetersson added a commit that referenced this issue Nov 10, 2019
@jhspetersson
Copy link
Owner

Thank you so much for supporting fselect packages! Added Cargo.lock with updated dependencies to master.

@Br1ght0ne
Copy link
Contributor

@jhspetersson Great! While we're at it, can we get a new (maybe minor) release so me and other maintainers can package it? Thanks!

@jhspetersson
Copy link
Owner

@filalex77 done. New 0.6.7 release has arrived. Thanks for all the efforts on bringing fselect to NixOS!

@samford
Copy link
Author

samford commented Nov 11, 2019

Thanks!

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

No branches or pull requests

3 participants