-
Notifications
You must be signed in to change notification settings - Fork 215
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
No longer ignore Cargo.lock #484
No longer ignore Cargo.lock #484
Conversation
+1 from me. I think lockfiles should be committed even for library crates. |
And yes you might want a periodic job that tests without the lockfile, but having normal CI test using the locked versions means that your work isn't interrupted by random weather. |
c4c7b93
to
fbec6d7
Compare
I am mostly familiar with JS dependency management where libraries lockfiles are not relevant to package resolution. Projects however would always want a lockfile committed and used for builds, since package resolution isn't usually deterministic depending when you build. That seems to be the case with Rust too #478 If the lockfile in a lib doesn't affect downstream projects using I just recall that it was not good in JS land if dependencies had lockfiles since it was better to just align with semver for more common dependency versions which the projects lockfile could then pin. |
If the The lockfile would prevent that issue right? But might not for consumers of If so, is the lockfile helping with maintenance of the crate, or would it mislead maintainers and still cause problems? EDIT: I read the nightly FAQ reference, which is also referenced from this Aug 2023 Rust blogpost (while as mentioned, prior advice was not to commit for libs and notes that downstream ignores the There seems to be good benefits to having the lock file, and scenarios like with |
Yes, that's why I think we need at least one CI job that does not call |
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
fbec6d7
to
c6c8ddd
Compare
This is a proposal to no longer ignore the lockfile for this repository.
Previously there was a guideline to ignore the lockfile for library crate projects (like this). This guideline was since removed. There is some discussion around the subject whether to checkin the lockfile or not.
I want to have this PR as a starting point of a discussion whether we want to change this and what we might want to do in terms of CI. Maybe we want more (less?) jobs for testing with dependencies? Updating dependencies in CI and test against newer versions?
I'll ping some contributors here for opinions.
@ijackson @polarathene