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

Unify/streamline long type name written to disk mechanism #129297

Open
jieyouxu opened this issue Aug 20, 2024 · 0 comments
Open

Unify/streamline long type name written to disk mechanism #129297

jieyouxu opened this issue Aug 20, 2024 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-cleanup Category: PRs that clean code up or issues documenting cleanup. D-diagnostic-infra Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jieyouxu
Copy link
Member

jieyouxu commented Aug 20, 2024

I've unified (I think) the long type output file in note_obligation_cause_code, and moved the filename note to the end of note_obligation_cause_code. The long type output file probably should be passed even further up the call chain. Although further up in the call chain, there are also various instances of scattered output file / filename notes (esp. in rustc_hir_typeck) which probably should eventually be somehow unified too (probably not in this PR).

Originally posted by @jieyouxu in #121739 (comment)


In rustc_hir_typeck and probably in more places, there are random scattered logic for writing long type names to disk. Last I tried to modify them in #121739, I discovered that:

  • Where and how these long type name files are created is inconsistent.
  • There are probably multiple places where different files are created, which can cause multiple long type name files to emitted if you aren't careful.
  • AFAICT, they might not properly respect --remap-path-prefix and such.
  • Not sure if this is problematic for reproducibility, probably not.

It's probably better if we tried to unify the long type name written to disk so they are treated consistently and to avoid the duplicate type name file output footguns. This could potentially aid in addressing #129296.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 20, 2024
@jieyouxu jieyouxu added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. D-diagnostic-infra Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself. A-diagnostics Area: Messages for errors, warnings, and lints and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-cleanup Category: PRs that clean code up or issues documenting cleanup. D-diagnostic-infra Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants