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

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 1 #100753

Merged
merged 3 commits into from
Aug 31, 2022
Merged

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 1 #100753

merged 3 commits into from
Aug 31, 2022

Conversation

beowolx
Copy link
Contributor

@beowolx beowolx commented Aug 19, 2022

Description

This is the first PR for the migration of the module rustc_session. You can follow my progress here.

The PR migrates the files cgu_reuse_tracker and parse.rs to use SessionDiagnostic .

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 19, 2022
@rust-highfive
Copy link
Collaborator

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

Please see the contribution instructions for more information.

@rustbot
Copy link
Collaborator

rustbot commented Aug 19, 2022

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 19, 2022
@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 19, 2022
@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

Gonna mark this as a draft since it's WIP

@compiler-errors compiler-errors marked this pull request as draft August 19, 2022 18:07
@rust-log-analyzer

This comment has been minimized.

@beowolx beowolx changed the title translations(rustc_session): migrates completely rustc_session translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 1 Aug 22, 2022
@beowolx beowolx marked this pull request as ready for review August 22, 2022 06:54
@beowolx
Copy link
Contributor Author

beowolx commented Aug 22, 2022

r? rust-lang/diagnostics

@rust-highfive rust-highfive assigned TaKO8Ki and unassigned nagisa Aug 22, 2022
@rust-log-analyzer

This comment has been minimized.

@beowolx beowolx changed the title translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 1 translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 1 Aug 22, 2022
@beowolx
Copy link
Contributor Author

beowolx commented Aug 22, 2022

@rustbot label -S-waiting-on-author +S-waiting-on-review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 22, 2022
@davidtwco
Copy link
Member

LGTM, waiting on #[fatal(..)] support landing

@beowolx beowolx mentioned this pull request Aug 22, 2022
84 tasks
@davidtwco davidtwco 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 23, 2022
@beowolx
Copy link
Contributor Author

beowolx commented Aug 23, 2022

@rustbot label -S-waiting-on-author +S-waiting-on-review

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 23, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 25, 2022
…grate-session, r=davidtwco

translations(rustc_session): migrates `rustc_session` to use `SessionDiagnostic` - Pt. 1

## Description

This is the first PR for the migration of the module `rustc_session`. You can follow my progress [here](rust-lang#100717 (comment)).

The PR migrates the files `cgu_reuse_tracker` and `parse.rs` to use `SessionDiagnostic `.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 25, 2022
…grate-session, r=davidtwco

translations(rustc_session): migrates `rustc_session` to use `SessionDiagnostic` - Pt. 1

## Description

This is the first PR for the migration of the module `rustc_session`. You can follow my progress [here](rust-lang#100717 (comment)).

The PR migrates the files `cgu_reuse_tracker` and `parse.rs` to use `SessionDiagnostic `.
This commit migrates the errors that indicates an incorrect
CGU type and the fatal error that indicates that a CGU has
not been correctly recorded
This commit migrates around 80% of the parse file to use SsessionDiagnostic
We still have to migrate struct_err and struct_warn.
This commit migrates the errors in the function check_expected_reuse
to use the new SessionDiagnostic. It also does some small refactor
for the IncorrectCguReuseType to include the 'at least' word in the
fluent translation file
@davidtwco
Copy link
Member

@bors r-

Commits were added after approving, so will re-approve to avoid bors funniness (try to avoid doing this in future)

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 30, 2022
@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 30, 2022

📌 Commit 2c77f3e has been approved by davidtwco

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 30, 2022
@beowolx
Copy link
Contributor Author

beowolx commented Aug 30, 2022

@bors r-

Commits were added after approving, so will re-approve to avoid bors funniness (try to avoid doing this in future)

Ah sorry for that! It was just a rebase, I didn't know it would cause problems 🙈

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 31, 2022
…grate-session, r=davidtwco

translations(rustc_session): migrates `rustc_session` to use `SessionDiagnostic` - Pt. 1

## Description

This is the first PR for the migration of the module `rustc_session`. You can follow my progress [here](rust-lang#100717 (comment)).

The PR migrates the files `cgu_reuse_tracker` and `parse.rs` to use `SessionDiagnostic `.
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 31, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#90946 (Ignore `reference`s in "Type::inner_def_id")
 - rust-lang#100730 (Migrate rustc_monomorphize to use SessionDiagnostic)
 - rust-lang#100753 (translations(rustc_session): migrates `rustc_session` to use `SessionDiagnostic` - Pt. 1)
 - rust-lang#100831 (Migrate `symbol_mangling` module to new diagnostics structs)
 - rust-lang#101204 (rustdoc: Resugar async fn return type in `clean`, not `html`)
 - rust-lang#101216 (Use in-page links for sanitizer docs.)
 - rust-lang#101237 (fix into_iter on ZST)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 24922b7 into rust-lang:master Aug 31, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 31, 2022
@beowolx beowolx deleted the translation-migrate-session branch August 31, 2022 19:15
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 8, 2022
…name-attr-warning-pt2, r=davidtwco

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2

# Description

This is the second part of the `rustc_session` [migration](rust-lang#100717 (comment)).

**Please only review this [commit](rust-lang@5018581) that belongs to the part 2. The other ones are from the PR [rust-lang#100753](rust-lang#100753) that is not yet merged.**

In this PR, we migrate the files `session.rs` and `config.rs`.

Please not that we have to `allow` the lints rules in some functions from `session.rs` because they are (at least I believe) part of the diagnostic machinery.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 8, 2022
…name-attr-warning-pt2, r=davidtwco

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2

# Description

This is the second part of the `rustc_session` [migration](rust-lang#100717 (comment)).

**Please only review this [commit](rust-lang@5018581) that belongs to the part 2. The other ones are from the PR [rust-lang#100753](rust-lang#100753) that is not yet merged.**

In this PR, we migrate the files `session.rs` and `config.rs`.

Please not that we have to `allow` the lints rules in some functions from `session.rs` because they are (at least I believe) part of the diagnostic machinery.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 8, 2022
…name-attr-warning-pt2, r=davidtwco

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2

# Description

This is the second part of the `rustc_session` [migration](rust-lang#100717 (comment)).

**Please only review this [commit](rust-lang@5018581) that belongs to the part 2. The other ones are from the PR [rust-lang#100753](rust-lang#100753) that is not yet merged.**

In this PR, we migrate the files `session.rs` and `config.rs`.

Please not that we have to `allow` the lints rules in some functions from `session.rs` because they are (at least I believe) part of the diagnostic machinery.
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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

10 participants