cargo: track Cargo.lock again - #81
Conversation
|
[..]
[..] With the recent merge of #80 the budget got a lot better. In general I do not disagree but at the same time I think its okay if things break when the size increases too much so that we can eval what to do about it. With the updated budget it should be much less fragile now. |
3de34fc dropped the lock on the reasoning in systemd/zram-generator#65: semantic version ranges plus upstream compatibility promises should be enough, naming exact versions claims they are better than others without evidence, and Fedora distro builds ignore the lock anyway. However: - We do not build from version ranges alone. tokio-vsock comes from git at rev c6225086, so a checkout already rests on one exact revision. The lock is what records the other 306. - Our RPM is also not the distro build that reasoning had in mind. It runs `rpmbuild --build-in-place` over this worktree and resolves crates from crates.io as it goes, so it reads whatever lock is present rather than a set of versions the distro chose. We want Cargo.lock for: - reproducible builds outside of Fedora/rpm packages - building with build systems like https://buck2.build/ which have a strict "input file hash" change semantics - move "surprise" regressions from unsuspecting unrelated PRs to the specific dependabot PR that bumps a dependency, to make these changes reviewable and bisectable. Pass `--locked` everywhere dependencies get resolved, so a lock that has drifted from Cargo.toml fails the build instead of being quietly rewritten. Signed-off-by: Martin Pitt <martin@amutable.com>
|
Dropped that size trap. |
72ae2b7 added the cargo entry alongside a tracked Cargo.lock; when 3de34fc dropped the lock the entry stayed, so it has been rewriting Cargo.toml requirements ever since with nothing else to update. The previous commit brings the lock back. Configure dependabot to allow indirect dependencies, so the part of the lock where most advisories land actually gets maintained. Document the current `increase-if-necessary` mode, which is what we want. Group patch updates into one pull request, since across 275 transitive packages they are mostly churn and do not each need a separate CI run. Minor and major bumps still arrive on their own, which matters when over half our direct dependencies are 0.x and a minor bump there is a breaking change. Signed-off-by: Martin Pitt <martin@amutable.com>
|
Fixed up the dependabot config. I just learned about that trap in a different project. |
Actually Also, the motivation to drop But if we need this to make buck builds work, then let's do it. |
|
@keszybz note the second commit here sets up dependabot. We need that anyway to also bump the dependencies in |
3de34fc dropped the lock on the reasoning in systemd/zram-generator#65:
semantic version ranges plus upstream compatibility promises should be
enough, naming exact versions claims they are better than others without
evidence, and Fedora distro builds ignore the lock anyway.
However:
We do not build from version ranges alone. tokio-vsock comes from git
at rev c6225086, so a checkout already rests on one exact revision.
The lock is what records the other 306.
Our RPM is also not the distro build that reasoning had in mind. It
runs
rpmbuild --build-in-placeover this worktree and resolvescrates from crates.io as it goes, so it reads whatever lock is
present rather than a set of versions the distro chose.
We want Cargo.lock for:
strict "input file hash" change semantics
specific dependabot PR that bumps a dependency, to make these changes
reviewable and bisectable.
Pass
--lockedeverywhere dependencies get resolved, so a lock that hasdrifted from Cargo.toml fails the build instead of being quietly
rewritten.
Signed-off-by: Martin Pitt martin@amutable.com
Plus the corresponding dependabot config update in the second commit.