Closed EdJoPaTo closed 1 year ago
Alright, I had forgotten that. For additional reference: https://github.com/rust-lang/cargo/issues/315
Note that this crate does contain both a library that can be used in other crates (which then correctly ignore the lock file) and a binary (under the feature main
) which can be built and used directly. For this binary, the lock file does make sense IMHO, assuming someone actually tested the binary with the locked versions.
The Cargo.lock file in the library will be ignored by users and therefore should be in the
.gitignore
in libraries. (introduced in #107)https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries
If a specific dependency version should be pinned it has to be pinned in the Cargo.toml as the Cargo.lock is ignored on dependent projects.