-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Account for -Z simulate-remapped-rust-src-base
when resolving remapped paths
#97786
Conversation
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
0d5e545
to
2dbbbd5
Compare
Note that this PR will fail CI until #97789 is merged, as |
This comment has been minimized.
This comment has been minimized.
r? rust-lang/compiler |
☔ The latest upstream changes (presumably #97989) made this pull request unmergeable. Please resolve the merge conflicts. |
2dbbbd5
to
bcf2962
Compare
Rebased, tests should now pass! |
This comment has been minimized.
This comment has been minimized.
bcf2962
to
1a5e2d8
Compare
r? @Mark-Simulacrum since you last reviewed this code |
@bors r+ |
📌 Commit 1a5e2d8 has been approved by |
…fix, r=Mark-Simulacrum Account for `-Z simulate-remapped-rust-src-base` when resolving remapped paths Discovered in rust-lang#97682, `-Z simulate-remapped-rust-src-base` only partially simulated the behavior of `remap-debuginfo = true`. While the flag successfully simulates the remapping when stdlib's `rmeta` file is loaded, the simulated prefix was not accounted for when the remapped path's local path was being discovered. This caused the flag to not fully simulate the behavior of `remap-debuginfo = true`, leading to inconsistent behaviors. This PR fixes rust-lang#97682 by also accounting for the simulated path.
…fix, r=Mark-Simulacrum Account for `-Z simulate-remapped-rust-src-base` when resolving remapped paths Discovered in rust-lang#97682, `-Z simulate-remapped-rust-src-base` only partially simulated the behavior of `remap-debuginfo = true`. While the flag successfully simulates the remapping when stdlib's `rmeta` file is loaded, the simulated prefix was not accounted for when the remapped path's local path was being discovered. This caused the flag to not fully simulate the behavior of `remap-debuginfo = true`, leading to inconsistent behaviors. This PR fixes rust-lang#97682 by also accounting for the simulated path.
Rollup of 7 pull requests Successful merges: - rust-lang#97423 (Simplify memory ordering intrinsics) - rust-lang#97542 (Use typed indices in argument mismatch algorithm) - rust-lang#97786 (Account for `-Z simulate-remapped-rust-src-base` when resolving remapped paths) - rust-lang#98277 (Fix trait object reborrow suggestion) - rust-lang#98525 (Add regression test for rust-lang#79224) - rust-lang#98549 (interpret: do not prune requires_caller_location stack frames quite so early) - rust-lang#98603 (Some borrowck diagnostic fixes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Note: this PR was a major source of the big perf regression seen in rollup #98656 (as the results from a perf run of its revert show). |
This PR is responsible for this regression, so I am tagging it as perf-regression. It landed in #98656 (a rollup), which as now been marked as having its perf regression triaged. I think the next step here is to investigate to see if we can avoid the at least to me unexpected impact here -- @pietroalbini can hopefully look into it a little. |
I'm... extremely confused how this could cause such a perf regression. I'll try to spend a bit of time loooking into it. |
…sion, r=Mark-Simulacrum Remove new allocations from `imported_source_files` rust-lang#97786 introduced a [large performance regression](rust-lang#97786 (comment)). After some local investigation it turns out the allocations performed by my change were the cause of the perf regression. This PR refactors my change to remove those allocations.
Discovered in #97682,
-Z simulate-remapped-rust-src-base
only partially simulated the behavior ofremap-debuginfo = true
. While the flag successfully simulates the remapping when stdlib'srmeta
file is loaded, the simulated prefix was not accounted for when the remapped path's local path was being discovered. This caused the flag to not fully simulate the behavior ofremap-debuginfo = true
, leading to inconsistent behaviors.This PR fixes #97682 by also accounting for the simulated path.