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

Track Cargo.lock #12

Closed
siph opened this issue Oct 8, 2022 · 3 comments
Closed

Track Cargo.lock #12

siph opened this issue Oct 8, 2022 · 3 comments

Comments

@siph
Copy link
Contributor

siph commented Oct 8, 2022

I opened a pull request to package oxker for nix package manager. Nix is highly focused on reproducibility and as a result requires the Cargo.lock file to pin specific dependency versions, otherwise it is impossible to build a cargo project for nixpkgs. As a result I've had to generate the Cargo.lock into a patch file to apply before building. This isn't ideal and makes maintaining more difficult as I will have to generate this file for every update.

Tracking the Cargo.lock file also make sense outside of the nix ecosystem and is considered best practice for binary applications as stated in the cargo book.

@mrjackwills
Copy link
Owner

mrjackwills commented Oct 8, 2022

That sounds cool, I keep hearing about NixOS all over the place, but haven't given it any time yet.

Yeah I can remove the Cargo.lock from the .gitingore, so that it will be tracked. I only stopped tracking it as it was creating some weird issue with the create_release.sh script that I use to, as the name suggests, create a new release. I'll try to remember, and work out, what the issue was, and find a better solution.

@siph
Copy link
Contributor Author

siph commented Oct 8, 2022

It turns out I don't actually need it because I can pull it from the crates repo, which apparently includes a lock file. I think it's still worth doing though, so I'll leave this issue open unless you want to close it.

Also, nix/nixpkgs is awesome and can be used outside of NixOS on basically any distro or on macOS. It's definitely worth checking out even if only for the massive amount of packaged applications.

@mrjackwills
Copy link
Owner

Nah, I want to try to do things, with regard to Rust, by the book (The book and by the book), so I should really be tracking Cargo.lock, shouldn't be too much effort to fix it

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