-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustbuild: Migrate tidy checks to Rust #32590
Conversation
@$(call E, check: feature sanity) | ||
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/ | ||
|
||
echo "make tidy" is now only available in rustbuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, if I use the old build system because testing is not implement in rustbuild yet, I won't be able to run make tidy
anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, yeah, but if it's an important enough use case the tidy check is a small enough program to be easily compile-able
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forget about users, what about the buildbots? This disables tidy checking on Travis, which is unfortunate to say the least. Do we even gate on rustbuild bots yet, or will this allow "untidy" code to merge?
I see that this new tidy has no dependencies other than std
so maybe it could still be compiled and run from the Makefiles with very little effort?
If that doesn't work, I would suggest at least making make tidy
spit out an error, because this line is easily overlooked in the build log, and I know I will forget that it doesn't work anymore and run make tidy
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we gate on rustbuild, no we won't check in "untidy" code because we're gating.
Yeah it's possible to just delete this rule altogether (to emit an error), but I figured we'd at least leave it here during a small transition period.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still sad to lose the quick feedback from Travis on trivial tidy issues. Please consider adding something to the effect of rustc src/tools/tidy/main.rs -o whereever/tidy && whereever/tidy
.
Yeah just deleting the rule is bad because unexplained breakage, but echo bla bla && false
would give both a message and an error. Though this does require adjusting .travis.yml
and buildbots right now instead of soon-ish so I understand if you don't want to do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, tidy errors slip through make check
by default, Travis doesn't catch them as well because it uses the old build system too, so without extra effort from PR authors tidy errors will be detected only after PR approval by rustbuild buildbots and will need to go through re-approval(s). Seems bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still sad to lose the quick feedback from Travis on trivial tidy issues. Please consider adding something to the effect of rustc src/tools/tidy/main.rs -o whereever/tidy && whereever/tidy.
And it would be much better if this line is added to the old build system instead of Travis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right so I figured no one actually runs make tidy
and we don't really care much about it so long as it runs somewhere, and it's trivial to add a builder on Travis if we really want. If it's really wanted that much though then a rule can just be added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
54d689f
to
e873e97
Compare
☔ The latest upstream changes (presumably #32544) made this pull request unmergeable. Please resolve the merge conflicts. |
db7c693
to
e5a2b63
Compare
Added a new tidy check which ensure that the dependencies listed in |
9d32f2e
to
71ec190
Compare
r=me but please squash the last commit |
71ec190
to
ae70c39
Compare
@bors: r=brson ae70c3913ab189407a15e8f6c25daa948708e85d |
⌛ Testing commit ae70c39 with merge d9a3447... |
💔 Test failed - auto-linux-64-x-freebsd |
☔ The latest upstream changes (presumably #32786) made this pull request unmergeable. Please resolve the merge conflicts. |
ae70c39
to
a183085
Compare
@bors: r=brson a183085 |
⌛ Testing commit a183085 with merge 403cf4c... |
💔 Test failed - auto-linux-64-x-freebsd |
a183085
to
dfb28be
Compare
@bors: r=brson dfb28be |
⌛ Testing commit dfb28be with merge 1ca6835... |
💔 Test failed - auto-linux-32-nopt-t |
dfb28be
to
7ef35a8
Compare
@bors: r=brson 7ef35a8 |
⌛ Testing commit 7ef35a8 with merge c765783... |
💔 Test failed - auto-win-msvc-64-opt |
This commit rewrites all of the tidy checks we have, namely: * featureck * errorck * tidy * binaries into Rust under a new `tidy` tool inside of the `src/tools` directory. This at the same time deletes all the corresponding Python tidy checks so we can be sure to only have one source of truth for all the tidy checks. cc rust-lang#31590
7ef35a8
to
386ca6a
Compare
@bors: r=brson 386ca6a182ba27394dd0c84c0564d8c183d7525e |
⌛ Testing commit 386ca6a with merge 07ee429... |
💔 Test failed - auto-win-msvc-64-opt |
This verifies that the crates listed in the `[dependencies]` section of `Cargo.toml` are a subset of the crates listed in `lib.rs` for our in-tree crates. This should help ensure that when we refactor crates over time we keep these dependency lists in sync.
386ca6a
to
7bfaeaa
Compare
rustbuild: Migrate tidy checks to Rust This commit rewrites all of the tidy checks we have, namely: * featureck * errorck * tidy * binaries into Rust under a new `tidy` tool inside of the `src/tools` directory. This at the same time deletes all the corresponding Python tidy checks so we can be sure to only have one source of truth for all the tidy checks. cc #31590
This commit rewrites all of the tidy checks we have, namely:
into Rust under a new
tidy
tool inside of thesrc/tools
directory. This atthe same time deletes all the corresponding Python tidy checks so we can be sure
to only have one source of truth for all the tidy checks.
cc #31590