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

Make references to GitHub issues in diagnostics consistent #62976

Closed
shepmaster opened this issue Jul 25, 2019 · 8 comments · Fixed by #68929
Closed

Make references to GitHub issues in diagnostics consistent #62976

shepmaster opened this issue Jul 25, 2019 · 8 comments · Fixed by #68929
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@shepmaster
Copy link
Member

Some diagnostics include a link to GitHub issues. From the ui testsuite, I found at least these two patterns:

 = note: for more information, see https://github.com/rust-lang/rust/issues/51999
 = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>

These should use the same format. My preference is for the latter:

see issue #XXXXX <https://github.com/rust-lang/rust/issues/XXXXX>

/cc @varkor

@shepmaster shepmaster added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-diagnostics Area: Messages for errors, warnings, and lints labels Jul 25, 2019
@shepmaster
Copy link
Member Author

General steps:

  1. Do some initial review of the *.stderr files in src/test/ui and see how many distinct patterns there are. I'd say this requires some knowledge of command line text processing.

  2. Identify the sources of each distinct pattern in the source code and unify them.

  3. The tests will need to be updated with the new diagnostics.

@punitkoura
Copy link

@shepmaster I'd like to take this up. Seems like a good first contribution to Rust.
Do we have an ETA for this?

@shepmaster
Copy link
Member Author

@punitkoura that’s wonderful! ❤️

Do we have an ETA for this?

I don’t think there’s any rush; it was mostly a minor annoyance I had when maintaining the playground.

@punitkoura
Copy link

I did an initial pass finding the different types of patterns of referencing Github issues. I was able to find 8 different types as follows -

(base) C02XF1TZJHD3:rust pkoura$ grep -rh --include "*.stderr" "/issues/" src/test/ui | sed -E 's/\#[0-9]+/#<ISSUE>/g' | sed -E 's/issues\/[0-9]+/issues\/<ISSUE>/g' | sort -u
           see https://github.com/rust-lang/rust/issues/<ISSUE> for more details
   = note: for more information, see https://github.com/rust-lang/rust/issues/<ISSUE>
   = note: for more information, see issue #<ISSUE> <https://github.com/rust-lang/rust/issues/<ISSUE>>
   = note: for more information, see issue https://github.com/rust-lang/rust/issues/<ISSUE>
   = note: the trait is implemented for `()`. Possibly this error has been caused by changes to Rust's type-inference algorithm (see: https://github.com/rust-lang/rust/issues/<ISSUE> for more info). Consider whether you meant to use the type `()` here instead.
error: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand. See https://github.com/rust-lang/rust/issues/<ISSUE>
note: use of `&&` operator here does not actually short circuit due to the const evaluator presently not being able to do control flow. See https://github.com/rust-lang/rust/issues/<ISSUE> for more information.
warning: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand. See https://github.com/rust-lang/rust/issues/<ISSUE>

@punitkoura
Copy link

Will focus now on identifying the sources of these patterns in the source code.

@eupn
Copy link
Contributor

eupn commented Jul 26, 2019

@shepmaster please take a look at #63008 PR. @punitkoura, thanks for a list of patterns, you might take a look as well.

@varkor
Copy link
Member

varkor commented Jul 31, 2019

@punitkoura: if you want help finding another good issue to work on, feel free to send me a message on Discord or Zulip. Any of the E-easy or E-mentor issues are good choices, though.

@punitkoura
Copy link

Thanks @varkor. I'll be on the lookout 🙂

Centril added a commit to Centril/rust that referenced this issue Jul 31, 2019
Make "see issue" consistent

Fixes rust-lang#62976. h/t to @punitkoura for initial patterns search.

r? @varkor
@JohnTitor JohnTitor added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 2, 2019
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Feb 8, 2020
…, r=Dylan-DPC

Make issue references consistent

Fixes rust-lang#62976

cc rust-lang#63008

r? @varkor because you reviewed the original pr
@bors bors closed this as completed in dc4242d Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants