Skip to content
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

Update rustc --explain sentence #48559

Closed

Conversation

GuillaumeGomez
Copy link
Member

Fixes @zackmdavis' concern.

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 26, 2018
@petrochenkov
Copy link
Contributor

Mentioned @zackmdavis' concern: #48337 (comment)

@@ -21,4 +21,4 @@ error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)

error: aborting due to 2 previous errors

If you want more information on this error, try using "rustc --explain E0453"
For more information about this error, try "rustc --explain E0453"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"rustc --explain E0453" -> `rustc --explain E0453`

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we start with a capital letter (seems appropriate here) then we should probably end with a dot.

@@ -43,4 +43,4 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`
error: aborting due to 4 previous errors

You've got a few errors: E0191, E0221
If you want more information on an error, try using "rustc --explain E0191"
For more information about an error, try "rustc --explain E0191"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zackmdavis What do you think about "You've got a few errors" above?

Copy link
Contributor

@petrochenkov petrochenkov Feb 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, do we have an English language expert here? Is the comma before "try" correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about "You've got a few errors" above?

I'd prefer "There were some errors" or "Some errors occurred."

Others might disagree with my style æsthetics, but to me, the second person (addressing the user as "you") and contractions feel like too much attempted folksiness in contrast to the "serious", "no-nonsense" tone I expect from compiler error messages.

Is the comma before "try" correct?

Yes, it's separating a dependent clause from a subsequent independent clause.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @zackmdavis here.

@GuillaumeGomez
Could you make the mentioned changes and then squash into 1 commit?

We should get this right on the first try (no grammatical errors, etc), I'd really like to avoid landing one more "+1,040 −1,042" PR potentially conflicting with any other PR changing UI tests.

@GuillaumeGomez
Copy link
Member Author

I'll wait for your questions to have answers before updating @petrochenkov. 😄

BTW, here's the python script I used this time:

from os import listdir
from os.path import isdir, isfile, join

PATHS = ["src/test/ui", "src/test/ui-fulldeps"]

def do_something(path):
    files = [join(path, f) for f in listdir(path)]

    for f in files:
        if isdir(f):
            do_something(f)
            continue
        if not isfile(f) or not f.endswith(".stderr"):
            continue
        x = open(f, "r")
        content = x.read()
        if "error[E" not in content:
            continue
        x = open(f, "w")
        x.write(content.replace("If you want more information on an error, try using",
                                "For more information about an error, try")
                       .replace("If you want more information on this error, try using",
                                "For more information about this error, try"))

for path in PATHS:
    do_something(path)

@zackmdavis
Copy link
Member

Frequent diagnostics contributors @oli-obk and @estebank might have opinions?

@petrochenkov
Copy link
Contributor

@GuillaumeGomez
Why did you need a separate script? src/test/ui/update-all-references.sh and src/test/ui-fulldeps/update-all-references.sh update stderr files for any changes.

@@ -43,4 +43,4 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`
error: aborting due to 4 previous errors

You've got a few errors: E0191, E0221
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing dot (same as #48559 (comment)).

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 27, 2018
@GuillaumeGomez
Copy link
Member Author

@petrochenkov: I didn't know such a script existed and it took me 5 minutes to write the python one so not really an issue...

We should get this right on the first try (no grammatical errors, etc), I'd really like to avoid landing one more "+1,040 −1,042" PR potentially conflicting with any other PR changing UI tests.

That's what review are normally for (it certainly annoys me more than you). :)

@petrochenkov
Copy link
Contributor

LGTM, but let's wait until the situation about #48562 is resolved.

@petrochenkov petrochenkov added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 27, 2018
@bors
Copy link
Contributor

bors commented Mar 4, 2018

☔ The latest upstream changes (presumably #48125) made this pull request unmergeable. Please resolve the merge conflicts.

@petrochenkov
Copy link
Contributor

Closing in favor of #48684 that does same rewording.

@GuillaumeGomez GuillaumeGomez deleted the explain-message branch August 19, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants