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

rust stdlib analysis contains absolute paths from appveyor and travis-CI #60157

Closed
staktrace opened this issue Apr 21, 2019 · 3 comments
Closed
Labels
A-save-analysis Area: saving results of analyses such as inference and borrowck results to a file. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@staktrace
Copy link
Contributor

Running something like rustup component add rust-analysis will download a tarball containing the -Zsave-analysis data for the rust stdlib crates. However, these JSON files in some cases contain absolute paths for the environment they were generated in, like /Users/travis/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/libc-0.2.46/src/unix/mod.rs or similar windows paths at C:\Users\appveyor, or other absolute paths like /cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/rustc-demangle-0.1.10/src/lib.rs. It would be better if the analysis data had relative paths so that the analysis files can be used on other machines.

See also rust-lang/rls#1339, /cc @Xanewok

@jonas-schievink jonas-schievink added A-save-analysis Area: saving results of analyses such as inference and borrowck results to a file. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 21, 2019
@Xanewok
Copy link
Member

Xanewok commented Apr 21, 2019

I believe we can use --remap-path-prefix to fix that.

Now we encode some of the paths (which are represented as PathBufs in rls-data see #60053 (comment)) as a byte vector, so it'd be also good for #60053 to land so we can see how much of the paths are affected.

@jyn514
Copy link
Member

jyn514 commented May 19, 2021

The compiler should be using /rustc/<long hash> for these paths consistently since #83813.

@jyn514
Copy link
Member

jyn514 commented Feb 19, 2023

Save-analysis has been removed from the compiler.

@jyn514 jyn514 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-save-analysis Area: saving results of analyses such as inference and borrowck results to a file. C-enhancement Category: An issue proposing an enhancement or a PR with one. 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

4 participants