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 to repository (remove from gitignore) #90

Closed
joachimschmidt557 opened this issue Jul 12, 2022 · 3 comments
Closed

Add Cargo.lock to repository (remove from gitignore) #90

joachimschmidt557 opened this issue Jul 12, 2022 · 3 comments

Comments

@joachimschmidt557
Copy link

According to the Cargo Book, executables should include the Cargo.lock file in their git repositories to enable reproducible builds and make packaging easier.

@jedisct1
Copy link
Member

jedisct1 commented Jul 12, 2022

In practice, this is unfortunately a massive pain when PRs (or anything to be merged) are not based on the very latest Cargo.toml version, with an up to date Cargo.lock generated by a compatible Rust version.

As a contributor to some Rust projects, I really hate that every time.

But well... given that there isn't a lot of external contributions to that project, it may be fine...

@jedisct1
Copy link
Member

jedisct1 commented Jul 12, 2022

Reproducible builds is not something Rust supports yet: rust-lang/rust#34902 https://github.com/rust-lang/rust/labels/A-reproducibility

@joachimschmidt557
Copy link
Author

Thanks! I should add: the reason for this "proposal" was that I'm trying to package this project for Nixpkgs, which requires the presence of a Cargo.lock file to make it "reproducible" enough for Nixpkgs.

If the Cargo.lock file is too much of a burden in the future, it can be patched in by the Nixpkgs build script.

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

2 participants