rustbuild: Add a tidy check to ensure Cargo.lock updates are checked in #32901
Labels
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Right now we don't have the majority of devs using rustbuild, so it's easy to modify Cargo.toml but forget to generate a new lock file. This in turns leads to messy diffs after the change has landed because anyone working on rustbuild will start seeing that diff.
Let's get the bots to fail the build if Cargo.toml is updated and Cargo.lock does not reflect that change. Essentially, after building all Cargo.lock files should remain unchanged. I would propose doing this by tracking the git status of Cargo.lock via these steps:
git diff-index --quiet HEAD 'src/**/Cargo.lock'
The
make tidy
message should be a nice error message like:(or something like that)
This should be pretty easy to implement once #32590 lands (it'll just be adding a new check in our
tidy
tool). Another good way to jump into rustbuild if you're interested!The text was updated successfully, but these errors were encountered: