Skip to content

Make references to GitHub issues in diagnostics consistent #62976

Closed

Description

@shepmaster

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

Activity

  1. added
    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
    A-diagnosticsArea: Messages for errors, warnings, and lints
    on Jul 25, 2019
  2. shepmaster commented on Jul 25, 2019

    @shepmaster
    MemberAuthor

    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.

  3. punitkoura commented on Jul 25, 2019

    @punitkoura

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

  4. shepmaster commented on Jul 25, 2019

    @shepmaster
    MemberAuthor

    @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.

  5. punitkoura commented on Jul 26, 2019

    @punitkoura

    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>
  6. punitkoura commented on Jul 26, 2019

    @punitkoura

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

  7. eupn commented on Jul 26, 2019

    @eupn
    Contributor

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

  8. varkor commented on Jul 31, 2019

    @varkor
    Contributor

    @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.

  9. punitkoura commented on Jul 31, 2019

    @punitkoura

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

  10. added a commit that references this issue on Jul 31, 2019
    07675af
  11. added
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Oct 2, 2019
  12. added a commit that references this issue on Feb 8, 2020
  13. added a commit that references this issue on Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions