-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
remap-path-prefix
will not re-compile properly in dev
build
#66955
Comments
Can you provide an example of this? Is this due to debuginfo included in the binary? |
😞, I was just trying to reproduce it again, but couldn't. Sorry! So this is now a re-compilation issue!
I'm not sure how it behaves on other operating systems, but in windows both
[profile.release]
debug = true
fn main() {
panic!("test");
} Both commands run with:
|
remap-path-prefix
only effective in release buildsremap-path-prefix
will not re-compile properly in dev
build
Perhaps the option needs to be TRACKED instead of UNTRACKED here? rust/src/librustc/session/config.rs Line 459 in 4af3ee8
|
I wanted to try it out, but I'm kinda having trouble building |
I haven't tested it out, but I believe changing remap_path_prefix to TRACKED will cause other problems, as it means the argument's value will be hashed. Then two builds in different directories that try to use that flag to get the same output will differ as they have different values for that argument. |
Well yes, that's the whole point. Their inputs are different so the outputs need to be recomputed. Otherwise it will end up caching the wrong values. Note that TRACKED can never break builds, or change the output compared to a non-incremental build, it can only make them slower. |
…woerister Add TRACKED_NO_CRATE_HASH and use it for `--remap-path-prefix` I verified locally that this fixes rust-lang#66955. r? `@Aaron1011` (feel free to reassign)
…woerister Add TRACKED_NO_CRATE_HASH and use it for `--remap-path-prefix` I verified locally that this fixes rust-lang#66955. r? ``@Aaron1011`` (feel free to reassign)
Old post
Using
remap-path-prefix
in development builds has no effect.I'm not sure if this is intended or not, but it's not documented.
Would write a documentation PR if this is intended.
Changing
remap-path-prefix
indev
mode will not properly cause re-compilation and the debug info will not change.In
release
mode changing the flag will always cause proper re-compilation and update the debug info accordingly.Meta
The text was updated successfully, but these errors were encountered: