Closed
Description
--remap-path-prefix
is supposed to remap all references to paths in all output (error messages, debug info, etc). It looks like this isn't happening for save-analysis files.
For example, in current nightly: rustc 1.29.0-nightly (12ed235 2018-07-18)
This input
pub struct Foo;
rustc -Zsave-analysis -g --crate-type=rlib --emit=metadata t.rs --error-format json --remap-path-prefix=$(pwd)=.
produces a save-analysis file which still has references to my home dir:
"external_crates": [
{
"file_name": "/Users/jsgf/t.rs",
"id": {
"disambiguator": [
287500826263317014,
5864436369277545838
],
"name": "std"
},
"num": 1
},
Example in full output.
This is undesirable because it makes the output depend on the build directory, which breaks build artifact caching.