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

Remove Cargo.lock #113

Closed
EdJoPaTo opened this issue Mar 1, 2023 · 2 comments · Fixed by #114
Closed

Remove Cargo.lock #113

EdJoPaTo opened this issue Mar 1, 2023 · 2 comments · Fixed by #114
Assignees

Comments

@EdJoPaTo
Copy link
Contributor

EdJoPaTo commented Mar 1, 2023

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.

@cfvescovo
Copy link
Collaborator

Alright, I had forgotten that.
For additional reference: rust-lang/cargo#315

@adamreichold
Copy link
Contributor

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.

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

Successfully merging a pull request may close this issue.

3 participants