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 - Final #101266

Merged
merged 2 commits into from
Sep 13, 2022
Merged

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final #101266

merged 2 commits into from
Sep 13, 2022

Conversation

beowolx
Copy link
Contributor

@beowolx beowolx commented Sep 1, 2022

Description

This is the final part of the rustc_session #100717 (comment).

Please only review this commit. The other ones are from the PR #101041 that is not yet merged.

In this PR, we migrate the file output.rs

@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 Sep 1, 2022
@rust-highfive
Copy link
Collaborator

r? @jackh726

(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 Sep 1, 2022
@beowolx beowolx changed the title Translation rustcsession pt3 translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final Sep 1, 2022
@rust-log-analyzer

This comment has been minimized.

@beowolx beowolx mentioned this pull request Sep 1, 2022
84 tasks
@beowolx
Copy link
Contributor Author

beowolx commented Sep 1, 2022

r? @davidtwco

@rust-highfive rust-highfive assigned davidtwco and unassigned jackh726 Sep 1, 2022
@beowolx beowolx marked this pull request as ready for review September 1, 2022 08:11
@rustbot
Copy link
Collaborator

rustbot commented Sep 1, 2022

rustc_error_messages was changed

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

@rust-log-analyzer

This comment has been minimized.

@beowolx
Copy link
Contributor Author

beowolx commented Sep 1, 2022

The job x86_64-gnu-llvm-13 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

running 229 tests
..........i.....ii...................................................................... 88/229
..i.........................i...................iiiiiii......i...................iii.... 176/229
Some tests failed in compiletest suite=run-make-fulldeps mode=run-make host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
...............................i...ii..F.............

---- [run-make] src/test/run-make-fulldeps/weird-output-filenames stdout ----

error: make failed
error: make failed
status: exit status: 2
command: "make"
--- stdout -------------------------------
cp foo.rs /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/weird-output-filenames/weird-output-filenames/.foo.rs
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/weird-output-filenames/weird-output-filenames:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/weird-output-filenames/weird-output-filenames -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/weird-output-filenames/weird-output-filenames  /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/weird-output-filenames/weird-output-filenames/.foo.rs 2>&1 \
 | "/checkout/src/etc/cat-and-grep.sh" -e "invalid character.*in crate name:"
[[[ begin stdout ]]]
thread 'rustc' panicked at 'identifier: "session_invalid_character_in_create_name", attr: None, args: FluentArgs([]), errors: [ResolverError(Reference(Variable { id: "character" })), ResolverError(Reference(Variable { id: "crate_name" }))]', compiler/rustc_errors/src/translation.rs:91:17
stack backtrace:
   0:     0x7f6b41b5012c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hfc487dcf423f7dc5
   1:     0x7f6b41bb8ca8 - core::fmt::write::h8b3d9a117ecda149
   2:     0x7f6b41b409a1 - std::io::Write::write_fmt::hc1f8e5607fcae684
   3:     0x7f6b41b5311e - std::panicking::default_hook::{{closure}}::h10b8ec90f5d1420b
   4:     0x7f6b41b52de7 - std::panicking::default_hook::h077c4fc56990cab2
   5:     0x7f6b424e2054 - rustc_driver[939608cf3f9c8401]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:     0x7f6b41b538d1 - std::panicking::rust_panic_with_hook::h255d1fc3fdfe100d
   7:     0x7f6b41b536f7 - std::panicking::begin_panic_handler::{{closure}}::hbe73b989bc6b0e39
   8:     0x7f6b41b506a4 - std::sys_common::backtrace::__rust_end_short_backtrace::hb90e20907a7a19fd
   9:     0x7f6b41b533c2 - rust_begin_unwind
  10:     0x7f6b41b03e43 - core::panicking::panic_fmt::h206079c3bf5fa5e3
  11:     0x7f6b451d8a6a - <rustc_errors[80a7ddfbd784b988]::emitter::EmitterWriter as rustc_errors[80a7ddfbd784b988]::translation::Translate>::translate_message
  12:     0x7f6b451ce052 - <rustc_errors[80a7ddfbd784b988]::emitter::EmitterWriter>::emit_message_default
  13:     0x7f6b451cbb72 - <rustc_errors[80a7ddfbd784b988]::emitter::EmitterWriter as rustc_errors[80a7ddfbd784b988]::emitter::Emitter>::emit_diagnostic
  14:     0x7f6b452258f8 - <rustc_errors[80a7ddfbd784b988]::HandlerInner>::emit_diagnostic
  15:     0x7f6b452215a6 - <rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed as rustc_errors[80a7ddfbd784b988]::diagnostic_builder::EmissionGuarantee>::diagnostic_builder_emit_producing_guarantee
  16:     0x7f6b4514a21f - <rustc_session[acee3a4a0a70eadd]::parse::ParseSess>::emit_err::<rustc_session[acee3a4a0a70eadd]::errors::InvalidCharacterInCrateName>
  17:     0x7f6b451a8a34 - rustc_session[acee3a4a0a70eadd]::output::validate_crate_name
  18:     0x7f6b451a8866 - rustc_session[acee3a4a0a70eadd]::output::find_crate_name
  19:     0x7f6b4261b544 - <rustc_interface[be3e3b91a6472b5b]::queries::Queries>::crate_name
  20:     0x7f6b4261adca - <rustc_interface[be3e3b91a6472b5b]::queries::Queries>::register_plugins
  21:     0x7f6b424e3792 - <rustc_interface[be3e3b91a6472b5b]::interface::Compiler>::enter::<rustc_driver[939608cf3f9c8401]::run_compiler::{closure#1}::{closure#2}, core[e1c75ed3987e2883]::result::Result<core[e1c75ed3987e2883]::option::Option<rustc_interface[be3e3b91a6472b5b]::queries::Linker>, rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>>
  22:     0x7f6b424d0551 - rustc_span[6fde1357d18f6af6]::with_source_map::<core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>, rustc_interface[be3e3b91a6472b5b]::interface::create_compiler_and_run<core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>, rustc_driver[939608cf3f9c8401]::run_compiler::{closure#1}>::{closure#1}>
  23:     0x7f6b424e6661 - rustc_interface[be3e3b91a6472b5b]::interface::create_compiler_and_run::<core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>, rustc_driver[939608cf3f9c8401]::run_compiler::{closure#1}>
  24:     0x7f6b424cd3c2 - <scoped_tls[723eb8456d42f204]::ScopedKey<rustc_span[6fde1357d18f6af6]::SessionGlobals>>::set::<rustc_interface[be3e3b91a6472b5b]::interface::run_compiler<core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>, rustc_driver[939608cf3f9c8401]::run_compiler::{closure#1}>::{closure#0}, core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>>
  25:     0x7f6b4254554f - std[3417fb0cb2b602d0]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[be3e3b91a6472b5b]::util::run_in_thread_pool_with_globals<rustc_interface[be3e3b91a6472b5b]::interface::run_compiler<core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>, rustc_driver[939608cf3f9c8401]::run_compiler::{closure#1}>::{closure#0}, core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>>::{closure#0}, core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>>
  26:     0x7f6b424cd9ae - std[3417fb0cb2b602d0]::panicking::try::<core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>, core[e1c75ed3987e2883]::panic::unwind_safe::AssertUnwindSafe<<std[3417fb0cb2b602d0]::thread::Builder>::spawn_unchecked_<rustc_interface[be3e3b91a6472b5b]::util::run_in_thread_pool_with_globals<rustc_interface[be3e3b91a6472b5b]::interface::run_compiler<core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>, rustc_driver[939608cf3f9c8401]::run_compiler::{closure#1}>::{closure#0}, core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>>::{closure#0}, core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>>::{closure#1}::{closure#0}>>
  27:     0x7f6b42548930 - <<std[3417fb0cb2b602d0]::thread::Builder>::spawn_unchecked_<rustc_interface[be3e3b91a6472b5b]::util::run_in_thread_pool_with_globals<rustc_interface[be3e3b91a6472b5b]::interface::run_compiler<core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>, rustc_driver[939608cf3f9c8401]::run_compiler::{closure#1}>::{closure#0}, core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>>::{closure#0}, core[e1c75ed3987e2883]::result::Result<(), rustc_errors[80a7ddfbd784b988]::ErrorGuaranteed>>::{closure#1} as core[e1c75ed3987e2883]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  28:     0x7f6b41b60645 - std::sys::unix::thread::Thread::new::thread_start::h1e1f1330b83c15f9
  29:     0x7f6b418fcb43 - <unknown>
  30:     0x7f6b4198ea00 - <unknown>
  31:                0x0 - <unknown>
error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.


note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.65.0-nightly (e34cc674c 2022-09-01) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack

[[[ end stdout ]]]
Error: cannot match: invalid character.*in crate name:
--- stderr -------------------------------
--- stderr -------------------------------
make: *** [Makefile:5: all] Error 1



failures:

I know why this test is failing. I forgot to add these params in the manually implementation of SessionDiagnostic. I'll correct it tonight.

@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as resolved.

@beowolx
Copy link
Contributor Author

beowolx commented Sep 5, 2022

I'm marking this PR as draft until I have the time to fix the test that is failling.

Good for review!

@rust-log-analyzer

This comment has been minimized.

@beowolx
Copy link
Contributor Author

beowolx commented Sep 6, 2022

@rustbot ready

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.

r=me after #101041 lands

@davidtwco davidtwco added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 6, 2022
@beowolx
Copy link
Contributor Author

beowolx commented Sep 8, 2022

Hey @davidtwco,

I have rebased this branch to update it with the last changes from #101041.

I still have the issue with #[rustc_lint_diagnostics], so I had to annotate some of the functions with allows as discussed before. You can check the diff here.

@bors

This comment was marked as resolved.

@beowolx
Copy link
Contributor Author

beowolx commented Sep 9, 2022

#101041 landed! Go for review.

@beowolx
Copy link
Contributor Author

beowolx commented Sep 9, 2022

r? @davidtwco

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Sep 12, 2022

📌 Commit 329d501 has been approved by davidtwco

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 12, 2022

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@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-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Sep 12, 2022
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 12, 2022
…stcsession-pt3, r=davidtwco

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final

# Description
This is the final part of the rustc_session rust-lang#100717 (comment).

Please only review this [commit](rust-lang@a545347). The other ones are from the PR rust-lang#101041 that is not yet merged.

In this PR, we migrate the file `output.rs`
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 13, 2022
…stcsession-pt3, r=davidtwco

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final

# Description
This is the final part of the rustc_session rust-lang#100717 (comment).

Please only review this [commit](rust-lang@a545347). The other ones are from the PR rust-lang#101041 that is not yet merged.

In this PR, we migrate the file `output.rs`
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 13, 2022
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#101266 (translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final)
 - rust-lang#101737 (rustdoc: remove no-op CSS `.search-results .result-name > span`)
 - rust-lang#101752 (Improve Attribute doc methods)
 - rust-lang#101754 (Fix doc of log function)
 - rust-lang#101759 (:arrow_up: rust-analyzer)
 - rust-lang#101765 (Add documentation for TyCtxt::visibility)
 - rust-lang#101770 (Rustdoc-Json: Don't loose subitems of foreign traits.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit bc8ec5e into rust-lang:master Sep 13, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 13, 2022
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.

7 participants