Conversation
There was a problem hiding this comment.
Code Review
This pull request removes Cargo.lock from the .gitignore file and commits the generated lock file to the repository. The reviewer advises against this change, explaining that library crates should generally ignore the lock file to ensure compatibility testing against the latest dependency versions in continuous integration, as recommended by the Cargo Book.
| @@ -1,4 +1,3 @@ | |||
| Cargo.lock | |||
| target | |||
There was a problem hiding this comment.
Committing Cargo.lock is generally discouraged for library crates. According to the Cargo Book, libraries should not check in their lock file. This ensures that the library is tested against the latest compatible versions of its dependencies in CI, which better reflects the environment of downstream users who will resolve dependencies based on their own lock files. Since netlink-proto is a library, it is recommended to keep Cargo.lock in .gitignore.
Cargo.lock
target
|
Any reason doing this? I have the impression that public crate does not include lock file. |
eb207a0 to
693684f
Compare
|
I know the reason of doing that for a project exposing binary. If we include In fedora rust build guideline, they suggest all rust tool depend on latest compatible crate instead of this pinned one. Above two links does not explain why a |
|
IMHO, maintaining this |
|
Any explanation beside emoji? |
|
I don't agree with you at all.
I'm not sure what you mean, users can still choose via
It's totally unrelated to this topic.
Explain why it's zero-benefit. Otherwise read the docs once again. You can ensure deterministic builds. |
|
The https://github.com/rust-lang/log/blob/master/.gitignore indicate even And https://github.com/tokio-rs/tokio/blob/master/.gitignore neither. I am aware of deterministic build, just don't know why it impact this rust-netlink fundamental crate. I am |
|
For MSRV stuff mentioned by FAQ doc. We have CI ensure we are good without this lock file. |
|
If you claim it as If you want this repo ship it, please explains which use case we are solving. And also explain how this file should be updated in the future release and CI tests. Both rust-lang.org doc has zero explicitly suggestion on whether library only crate should ship it or not. |
No description provided.