Skip to content

Conversation

naritanara
Copy link
Contributor

This PR migrates rustc_passes diagnostics to use the new translatable system

@rustbot label +A-translation
r? rust-lang/diagnostics
cc #100717

@rustbot rustbot added the A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic label Aug 22, 2022
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @compiler-errors (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 22, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 22, 2022
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

This a great start! Looks like there are still some diagnostics to port according to the CI failures :)

@davidtwco davidtwco mentioned this pull request Aug 23, 2022
84 tasks
@compiler-errors compiler-errors 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 Aug 25, 2022
@naritanara naritanara force-pushed the migrate_rustc_passes_diagnostics branch from e8d410e to 6aaf96e Compare September 2, 2022 03:43
@rust-log-analyzer

This comment has been minimized.

@davidtwco
Copy link
Member

🎉 Thanks for your continued work on this!

@naritanara naritanara force-pushed the migrate_rustc_passes_diagnostics branch from 479a343 to fb6d205 Compare September 8, 2022 09:13
@davidtwco
Copy link
Member

Thanks for keeping going with this, please mark it was "ready for review" when you'd like to merge this - we don't need to wait for the whole crate to be complete, whatever you prefer.

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_save_analysis v0.0.0 (/checkout/compiler/rustc_save_analysis)
error[E0053]: method `into_diagnostic` has an incompatible type for trait
   --> compiler/rustc_passes/src/errors.rs:711:15
    |
711 |         sess: &'_ rustc_session::parse::ParseSess,
    |               |
    |               |
    |               expected struct `Handler`, found struct `ParseSess`
    |
    |
    = note: expected fn pointer `fn(InvalidAttrAtCrateLevel, &Handler) -> DiagnosticBuilder<'_, _>`
               found fn pointer `fn(InvalidAttrAtCrateLevel, &ParseSess) -> DiagnosticBuilder<'_, _>`
For more information about this error, try `rustc --explain E0053`.
error: could not compile `rustc_passes` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `rustc_passes` due to previous error

@naritanara
Copy link
Contributor Author

Thanks for keeping going with this, please mark it was "ready for review" when you'd like to merge this - we don't need to wait for the whole crate to be complete, whatever you prefer.

This weekend I plan to advance a good bit with this. I would have done earlier, but I messed up with my local clone and lost the day fixing it. The joys of git.

@bors
Copy link
Collaborator

bors commented Sep 13, 2022

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

@naritanara
Copy link
Contributor Author

Due to college, I'll have to abandon the PR. Anyone can feel free to retake my work from the point I left it (I'll keep my fork available). Thanks for all the help with this, and I hope I can contribute with something else in the future.

@naritanara naritanara closed this Sep 20, 2022
@CleanCut CleanCut mentioned this pull request Sep 21, 2022
22 tasks
@CleanCut
Copy link
Contributor

I have opened #102110 to pick up this work. I would love for some collaborators to come and join me in fixing this one, as it is rather large. I outlined the TODO items in the PR description. Come join in!

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Oct 11, 2022
…nostics, r=davidtwco

Migrate rustc_passes diagnostics

Picks up abandoned work from rust-lang#100870

I would like to do this collaboratively, as there is a lot of work! Here's the process:

- Comment below that you are willing to help and I will add you as a collaborator to my `rust` fork (that gives you write access)
- Indicate which file/task you would like to work on (so we don't duplicate work) from the list below
- Do the work, push up a commit, comment that you're done with that file/task
- Repeat until done 😄

### Files to Migrate (in `compiler/rustc_passes/src/`)

- [x] check_attr.rs `@CleanCut`
- [x] check_const.rs `@CleanCut`
- [x] dead.rs `@CleanCut`
- [x] debugger_visualizer.rs `@CleanCut`
- [x] diagnostic_items.rs `@CleanCut`
- [x] entry.rs `@CleanCut`
- [x] lang_items.rs `@CleanCut`
- [x] layout_test.rs `@CleanCut`
- [x] lib_features.rs `@CleanCut`
- [x] ~liveness.rs~ `@CleanCut` Nothing to do
- [x] loops.rs `@CleanCut`
- [x] naked_functions.rs `@CleanCut`
- [x] stability.rs `@CleanCut`
- [x] weak_lang_items.rs `@CleanCut`

### Tasks

- [x] Rebase on current `master` `@CleanCut`
- [x] Review work from [the earlier PR](rust-lang#100870) and make sure it all looks good
  - [x] compiler/rustc_error_messages/locales/en-US/passes.ftl `@CleanCut`
  - [x] compiler/rustc_passes/src/check_attr.rs `@CleanCut`
  - [x] compiler/rustc_passes/src/errors.rs `@CleanCut`
  - [x] compiler/rustc_passes/src/lang_items.rs `@CleanCut`
  - [x] compiler/rustc_passes/src/lib.rs `@CleanCut`
  - [x] compiler/rustc_passes/src/weak_lang_items.rs `@CleanCut`
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Oct 12, 2022
…nostics, r=davidtwco

Migrate rustc_passes diagnostics

Picks up abandoned work from rust-lang#100870

I would like to do this collaboratively, as there is a lot of work! Here's the process:

- Comment below that you are willing to help and I will add you as a collaborator to my `rust` fork (that gives you write access)
- Indicate which file/task you would like to work on (so we don't duplicate work) from the list below
- Do the work, push up a commit, comment that you're done with that file/task
- Repeat until done 😄

### Files to Migrate (in `compiler/rustc_passes/src/`)

- [x] check_attr.rs ``@CleanCut``
- [x] check_const.rs ``@CleanCut``
- [x] dead.rs ``@CleanCut``
- [x] debugger_visualizer.rs ``@CleanCut``
- [x] diagnostic_items.rs ``@CleanCut``
- [x] entry.rs ``@CleanCut``
- [x] lang_items.rs ``@CleanCut``
- [x] layout_test.rs ``@CleanCut``
- [x] lib_features.rs ``@CleanCut``
- [x] ~liveness.rs~ ``@CleanCut`` Nothing to do
- [x] loops.rs ``@CleanCut``
- [x] naked_functions.rs ``@CleanCut``
- [x] stability.rs ``@CleanCut``
- [x] weak_lang_items.rs ``@CleanCut``

### Tasks

- [x] Rebase on current `master` ``@CleanCut``
- [x] Review work from [the earlier PR](rust-lang#100870) and make sure it all looks good
  - [x] compiler/rustc_error_messages/locales/en-US/passes.ftl ``@CleanCut``
  - [x] compiler/rustc_passes/src/check_attr.rs ``@CleanCut``
  - [x] compiler/rustc_passes/src/errors.rs ``@CleanCut``
  - [x] compiler/rustc_passes/src/lang_items.rs ``@CleanCut``
  - [x] compiler/rustc_passes/src/lib.rs ``@CleanCut``
  - [x] compiler/rustc_passes/src/weak_lang_items.rs ``@CleanCut``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants