Skip to content

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

Open
@jieyouxu

Description

@jieyouxu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.D-diagnostic-infraDiagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions