-
Notifications
You must be signed in to change notification settings - Fork 151
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
Check in Cargo.lock #399
Comments
The first stable version of Cargo that supports publishing lock-files is 1.37. |
I disagree with your reasoning: Semver has proven to provide pretty good stability that API breakage does pretty much never happen. On the other hand people are continuously improving their crates in a compatible manner, ranging from dependency cutting over optimisation all the way to fixing bugs detected by newer Rust compiler versions or forward compatibility lints that it actually is very desirable to automatically receive those updates without having to intervene manually, which is a cumbersome and very annoying maintenance task. Indeed as you mentioned the purpose of Cargo.lock is to provide reproducible builds however I don't see much value in rebuilding IMHO the far bigger hazard here is that |
I agree that semver generally works quite well, and that picking up the latest version of compatible crates is generally desirable for end users. Note that this won't change when including Regardless of if we would rebuild Furthermore, it turns out that correctly applying semver is quite tricky. We've had breakages specifically due to semver when the I guess my question is: why not check in |
Because it requires a ton of manual work to maintain. Work that I'm absolutely not willing to commit to for in my eyes negative gain. I don't really see why we are supposed to do the pinning upstream when you can easily do it yourself. If you're so keen on building exact versions anyway you're most likely doing your own vetting/verification anyway so why not simply maintain your own fork with a Cargo.lock. |
I don't think this is the way to go. If something breaks semver, we deal with it as fast as we can. But enforcing Cargo.lock requires too much work to keep up to date and provides negligible improvements. If you want to make your CI work reproducibly, I'd say you should check in a Cargo.lock besides Cargo.toml in your CI source/builder. Edit:: too clarify, my position on this has changed after having to deal with checked in Cargo.lock in repositories. One way to solve this for me is to expand our CI and implement automatic Cargo.lock bumps, but that introduces repo noise and can make bugs slip through more easily. |
This is a problem for packaging maintainers.
My opinion is that reproducible builds add value, and requiring each user who desires reproducible builds to maintain their own This has all been discussed before, but there has been new developments since this issue was opened:
Do either of these recent developments change the discussion / decision? |
That makes it even worse. Now we not only have to maintain the
I'm not terribly opposed to having a |
Lock files only matter for published binary crates when using I think adding a lockfile is fine if we make at least one ci check to use --locked It doesnt need to be updated frequently imo. |
Sure, but that's exactly the point: We still need to have more frequent releases to cater for the people who requested reproducible builds in the first place. A big part of the idea behing reproducible builds is that you can a) reproduce them and make sure no one tampered with the binaries and b) know exactly which version goes in so it's known whether you're affected by security issues or such... The latter implies that lockfiles are frequently updated and new versions released; not that it should matter at all for an offline "text processor"...
No, if |
Ah yes, I was thinking that new features in respect to semver patch are additive, and a single check would catch when features are missing, but that does not work if the change is not in this particular check, eg |
A lockfile has been added in #741 |
With the stabilization of Cargo.lock file publishing in rust-lang/cargo#7026, lets restart the discussion from #148 about adding
Cargo.lock
to the repo.My two cents: not having
Cargo.lock
checked in is a huge road block to usingsvd2rust
in production.Backgroud: we are running
svd2rust
on every CI build. By not lockingsvd2rust
, there is a chance that the final artifact is not reproducible if a package dependent on bysvd2rust
fails to adhere to semver. More realistically, such an update breaks the build, which is completely unacceptable.The text was updated successfully, but these errors were encountered: