Open
Description
ParseSess::env_depinfo
stores Symbol
instead of OsStr
.
While we're at it, might make sense to actually not store the environment variable value at all, and instead fetch it inside write_out_deps
? (which assumes that the variable won't change during execution of the compiler, but it probably won't).
See also #130883 (comment).
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
bjorn3 commentedon Dec 1, 2024
Cargo expects the dep-info file to be valid UTF-8 and
parse_rustc_dep_info
returns an error when it isn't. As the env var value is included in the dep-info file, this implies that the env var value itself has to be UTF-8 too.petrochenkov commentedon Dec 1, 2024
In the original PR introducing the env depinfo we discussed support for non UTF-8, and the outcome was to postpone it until there's a sufficient motivation, it can always be done with some new directive,
# env-dep-escaped
or something (#71858 (comment)).#130883 (comment) merely suggests moving the recovery point for non-UTF-8 env vars to
fn write_out_deps
.madsmtm commentedon Dec 3, 2024
Sorry, I misunderstood, then. Still, I think keeping it separate from that PR is valuable