Closed
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Description
I've added a single word to an error message, and it broke tests for a silly reason:
tidy error: /checkout/src/test/ui/export-fully-qualified.rs:6: line longer than 100 chars
tidy error: /checkout/src/test/ui/export2.rs:2: line longer than 100 chars
tidy error: /checkout/src/test/ui/imports/extern-prelude-extern-crate-fail.rs:10: line longer than 100 chars
The line has to be that long, otherwise it's not testing the message. I don't know what to do about this.
Metadata
Metadata
Assignees
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Activity
kornelski commentedon Aug 27, 2020
Ok, I've found
// ignore-tidy-line-length. But I think it should be the default for UI tests.petrochenkov commentedon Aug 27, 2020
I disagree that this is an issue, various tidy checks are still very much useful for test code.
//~ ERRORannotations in*.rsfiles are not required to contain full messages and can be trimmed to their "essential part" if necessary,*.stderrfiles will contain full messages anyway.// ignore-tidy-line-lengthand other// ignore-*directives are tools of last resort and should only be used in exceptional cases.[-]tidy is being run on UI tests[/-][+]Tidy on UI tests is annoying[/+]kornelski commentedon Aug 28, 2020
Tidy has been a nightmare.
// ignore-tidy-line-length(if I truncated the message instead, it wouldn't be testing the word I added)I just wanted to add one word to an error message. It's taking me hours of tinkering and recompiling and the PR is taking two days to just get past the tidy.
My enthusiasm went from "I've found a poorly worded error, I can fix it!" to "screw the petty gatekeeping tool, I don't have time to fight this".
petrochenkov commentedon Aug 28, 2020
Perhaps it's annoying for the first time, but updating failing tests doesn't require any rebuilds and take ~5 minutes at most after the initial build.
x.py test --bless src/test/ui tidyfor the first time, this is the long part.//~ ERRORannotations, they are fixed by updating or trimming the//~ ERRORannotations.x.py test --bless src/test/ui tidyis run again, it won't build anything and only re-test the changed tests. Fix remaining errors if something was missing, repeat as necessary.pickfire commentedon Sep 9, 2020
But what do I need to do? I got this
No action was mention on how to solve it so the first one that came into my mind is to add
tidy ignore. Maybe it should have some actionable steps?The line looks like this and I don't know how to continue other than the mentioned
// ignore tidy-line-length, I don't quite know how should I trim it.jyn514 commentedon Apr 30, 2021
@kornelski do you think disabling the line length check is enough? #77675
Or do you think other checks should be disabled too?
I do think tidy (and all tests really) should suggest how to replicate exactly what went wrong without running a full x.py test, I'll open a separate issue for that.
kornelski commentedon Apr 30, 2021
Line length has been the major issue, so perhaps just this is enough.
jyn514 commentedon Apr 30, 2021
Ok. I'm sorry you had a frustrating experience. I'll see if I can implement #84742 today or this weekend.