causal-agent / scraper

HTML parsing and querying with CSS selectors
https://docs.rs/scraper
ISC License
1.81k stars 100 forks source link

Remove Cargo.lock #113

Closed EdJoPaTo closed 1 year ago

EdJoPaTo commented 1 year ago

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 commented 1 year ago

Alright, I had forgotten that. For additional reference: https://github.com/rust-lang/cargo/issues/315

adamreichold commented 1 year ago

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.