-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking Issue for rustc's translatable diagnostics infrastructure #132181
Copy link
Copy link
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-translationArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnosticArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnosticC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCD-diagnostic-infraDiagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.E-needs-designThis issue needs exploration and design to see how and if we can fix/implement itThis issue needs exploration and design to see how and if we can fix/implement itS-tracking-needs-deep-researchStatus: This feature needs deep research to solve design or implementation issues.Status: This feature needs deep research to solve design or implementation issues.S-tracking-needs-design-proposalStatus: This needs a clear design proposal and then a meeting with the team.Status: This needs a clear design proposal and then a meeting with the team.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.WG-diagnosticsWorking group: DiagnosticsWorking group: Diagnostics
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-translationArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnosticArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnosticC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCD-diagnostic-infraDiagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.E-needs-designThis issue needs exploration and design to see how and if we can fix/implement itThis issue needs exploration and design to see how and if we can fix/implement itS-tracking-needs-deep-researchStatus: This feature needs deep research to solve design or implementation issues.Status: This feature needs deep research to solve design or implementation issues.S-tracking-needs-design-proposalStatus: This needs a clear design proposal and then a meeting with the team.Status: This needs a clear design proposal and then a meeting with the team.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.WG-diagnosticsWorking group: DiagnosticsWorking group: Diagnostics
Type
Fields
Give feedbackNo fields configured for issues without a type.
This is a tracking issue for rustc's translatable diagnostics infrastructure, which is related to #100717 but reflects the current status.
Current status
Unfortunately, we have found that the current implementation of diagnostic translation infrastructure causes significant friction for compiler contributors when trying to work on diagnostics, including but not limited to:
errors.rsand the emission site, etc.)rustc_const_evalor other not-migrated examples.Important
Based on these friction points, we want to downgrade the internal lints
untranslatable_diagnostic/diagnostic_outside_of_implrequiring usage of current translatable diagnostic infra fromdenytoallow.If someone wants to continue the translatable diagnostics effort, then they will need to come up with a better redesign that causes less friction for compiler contributors.
Related discussions
InterpError: error enum variants vsthrow_ub_custom!#112618Implementation steps
Relaxing the current restrictions
untranslatable_diagnosticanddiagnostic_outside_of_implfromdenytoallow.untranslatable_diagnosticanddiagnostic_outside_of_impltoallow#132182Come up with a redesign
Note: this is not currently being actively worked on AFAICT, please speak with wg-diagnostics and T-compiler if you wish to pursue this. See specifically https://rust-lang.zulipchat.com/#narrow/channel/336883-i18n/topic/.23100717.20diag.20translation/near/472701978.
Further steps are presently unclear.
Unresolved questions
Implementation / experimentation history
This listing is moreso focused on diagnostic infra itself, not migration efforts. Please see the closed PRs for what concrete issues they have ran into.
More discussions
cc @rust-lang/wg-diagnostics