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

Get rid of /rustc/$hash hack #72953

Open
pnkfelix opened this issue Jun 3, 2020 · 1 comment
Open

Get rid of /rustc/$hash hack #72953

pnkfelix opened this issue Jun 3, 2020 · 1 comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@pnkfelix
Copy link
Member

pnkfelix commented Jun 3, 2020

Spawned off of a8e4236

Right now, /rustc/$hash is used as a magic prefix to track paths into libstd source so that it can be remapped to local developer paths when they install the rust-src component.

But, as @eddyb pointed out on PR #72767, once we are willing to actually allocate another entry in the FileName enum (or its moral equivalent, splitting the payload of one of its variants into two via a separate RealFileName enum), then we should be able to do away with the /rustc/$hash prefix hack entirely within the rustc source code.

@pnkfelix pnkfelix added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-cleanup Category: PRs that clean code up or issues documenting cleanup. P-medium Medium priority labels Jun 3, 2020
@eddyb
Copy link
Member

eddyb commented Jun 25, 2020

The problem is having a way to cause the "virtualized" case to be used. Perhaps remapping to something more like remapping to rustc:$hash (which isn't a valid path AFAIK) instead of /rustc/$hash.

There's also the possibility that distros may choose to do something with /rustc/$hash (since it will show up in debuginfo), although I'm not sure what.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. P-medium Medium priority 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