rust-embedded / cargo-binutils

Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain
Apache License 2.0
474 stars 41 forks source link

Include `Cargo.lock` as is conventional for binary crates #103

Open mitchmindtree opened 3 years ago

mitchmindtree commented 3 years ago

This is personally motivated by the desire for easier interop with the rustPlatform.buildRustPackage nix tool which requires a Cargo.lock file to exist in the source git repository, however from memory this practise is also recommended by the official rust docs:

https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries

rust-highfive commented 3 years ago

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @adamgreig (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

mitchmindtree commented 3 years ago

Ahh - for any future nix readers, it seems you can now work around this cargo.lock requirement by pointing to crates.io instead (as long as you don't need master) and using fetchCrate as described here.

adamgreig commented 3 years ago

Previously @therealprof commented on this issue at https://github.com/rust-embedded/cargo-binutils/pull/99#issuecomment-757503230, though I don't completely understand the arguments either way.