Uh oh!
There was an error while loading. Please reload this page.
Tidy should not check line lengths in tests - #77675
Conversation
rust-highfive
commented
Oct 7, 2020
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Mark-Simulacrum
commented
Oct 7, 2020
This looks great, it looks like it might've accidentally deleted a file though? |
petrochenkov
commented
Oct 7, 2020
I responded to this suggestion previously in #75987 (comment). If the rule is relaxed, the the relaxation should at least be applied only to lines with |
Mark-Simulacrum
commented
Oct 7, 2020
Note that we're just silencing the line length warning. That's silenced in most of our code anyway due to rustfmt "taking care of it". I am okay with limiting this to just the I think there's not too much value in truncating those to 100 characters (unlike regular comments/code). cc @RalfJung |
jyn514
commented
Oct 7, 2020
Please also exclude |
Anthuang
commented
Oct 8, 2020
I've made it check only for lines containing the text you've mentioned, but there are many other lines that are too long (e.g. I noticed that some of the lines are long intentionally, such as the line in src/test/ui/slowparse-string.rs, so we may have to leave the |
Mark-Simulacrum
commented
Oct 9, 2020
I think we want to allow any directives that contain error substrings (i.e., things that cannot be wrapped) via tidy changes, and any tests that remain after that should indeed retain ignore-tidy-linelength. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Mark-Simulacrum
commented
Oct 13, 2020
I would prefer that we use the regex in compiletest in addition to the ANNOTATIONS_TO_IGNORE list; it looks like the regex covers more cases than just those enumerated. Please also add a comment to both locations pointing at the other location to make sure they get updated mutually as needed. Also, it would be great if you could rebase your changes such that you have a single commit that changes code and another commit updating the tests for the fallout from that change (i.e., removing linelength annotations from a subset of the tests). If you don't know how to do this, I can try to explain, or I can do it for you, no worries there. It also looks like CI is failing due to a lack of re-blessing, but I would hold off on doing so for now since it's likely I'll have further feedback after this round of review :) |
Anthuang
commented
Oct 14, 2020
Could you point me to where you're talking about? I found this line https://github.com/rust-lang/rust/blob/master/src/tools/compiletest/src/runtest.rs#L3396 but not sure if this was what you were referring to. I should be able to manage rebasing! |
Mark-Simulacrum
commented
Oct 14, 2020
Yes, sorry, I should have linked to it, I meant https://github.com/rust-lang/rust/blob/master/src/tools/compiletest/src/runtest.rs#L3393-L3396 (same as you linked). I think I had implicitly linked it in my mind since I was reading @petrochenkov's comment earlier :) |
62b890a to
fdd1513Compare
This comment has been minimized.
This comment has been minimized.
Anthuang
commented
Oct 27, 2020
@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author Going to change the label without rebasing, since Mark said I can hold off on rebasing. |
Mark-Simulacrum
commented
Nov 5, 2020
r=me with a rebase (CI needs fixing, but I think that's part of the rebase in some sense) |
c73f916 to
711a665CompareAnthuang
commented
Nov 5, 2020
I've just rebased! @Mark-Simulacrum @rustbot modify labels: +S-waiting-on-review -S-waiting-on-author |
bors
commented
Nov 19, 2020
💔 Test failed - checks-actions |
Dylan-DPC-zz
commented
Nov 19, 2020
failed in rollup as well @bors r- |
jyn514
commented
Nov 19, 2020
@bors rollup=never |
Mark-Simulacrum
commented
Nov 22, 2020
@Anthuang It looks like the tests in question failed because we're hard coding line numbers into them -- I imagine you can bump those back by one? |
1b60ccb to
9393ff6CompareMark-Simulacrum
commented
Dec 1, 2020
@bors p=5 for next approval Let me know if you'd like me to fix these on the next go around instead of the back and forth or feel free to ping me on Zulip and I can try to fast-track an r+ for you :) |
jyn514
commented
Dec 1, 2020
@Mark-Simulacrum does it make sense to disable the "ignoring length unnecessarily" lint temporarily so this can land? Then once this lands people will stop adding the ignore and it will be easier to turn the lint back on. |
Mark-Simulacrum
commented
Dec 1, 2020
Yeah, that'd be fine with me as well, we can definitely do this in two parts. |
9393ff6 to
da8a895Comparebors
commented
Dec 3, 2020
☔ The latest upstream changes (presumably #79637) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels: |
crlf0710
commented
Dec 18, 2020
@Anthuang Ping from triage: any updates on this? |
@crlf0710 see #77675 (comment) - this fails every time it's rolled up or takes more than ~an hour to be approved because almost every single other PR has semantic conflicts. It needs either a |
JohnCSimon
commented
Feb 8, 2021
@Anthuang Ping from triage: unfortunately I'm closing this this due to inactivity - please feel free to reopen when you're ready to continue with this. |
This is step 1 towards fixing rust-lang#77548. This commit includes the tidy change from rust-lang#77675. The "ignoring file length unnecessarily" check is temporarily disabled to simplify landing the ignore-rules. That check will be re-enabled in a follow-up PR.
…-Simulacrum tidy: Add ignore-rules for the line length check This is step 1 towards fixing rust-lang#77548. This PR contains the `tidy` change from rust-lang#77675. The "ignoring file length unnecessarily" check is temporarily disabled to simplify landing the ignore-rules. This check will be re-enabled in a follow-up PR.
Tidy will not check line lengths in tests even without the
// ignore-tidy-linelengthannotations. This PR also removes all the annotations which are now unnecessary.Closes: #77548