mrjackwills / oxker

A simple tui to view & control docker containers
MIT License
727 stars 24 forks source link

Track `Cargo.lock` #12

Closed siph closed 2 years ago

siph commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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