-
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
-Z simulate-remapped-rust-src-base
is not fully simulating remap-debuginfo = true
#97682
Comments
Thanks for reporting! Totally agree with your suggestions, I'm going to open a PR to disable that UI test later. |
-Z simulate-remapped-rust-src-base
is not working as expected with remap-debuginfo = true
Opened #97750, and retitled this issue as the issue is not limited to UI test, I think. |
|
Found the cause of the mismatch between When rust/compiler/rustc_metadata/src/rmeta/decoder.rs Lines 1578 to 1601 in 9a74608
The problem is, below in the same file, another piece of code tries to determine the local path of a remapped path if available: rust/compiler/rustc_metadata/src/rmeta/decoder.rs Lines 1479 to 1556 in 9a74608
That code is not correct, as it only looks at the prefix set by bootstrap when This also explains the difference @japaric identified depending on whether the |
These flags make UI test fail on some env. See rust-lang#97682 for more details.
-Z simulate-remapped-rust-src-base
is not working as expected with remap-debuginfo = true
-Z simulate-remapped-rust-src-base
is not fully simulating remap-debuginfo = true
…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.
alternative title:
-Z simulate-remapped-rust-src-base
is not working as expected withremap-debuginfo = true
Hello! We are running the compiler test with a compiler configured with
remap-debuginfo = true
and after a recent PR merge we observed that thesrc/test/ui
test suite is no longer passing. After looking into the issue I think a (test only?)-Z
compiler flag may not be working as intended. Details below and apologies for not using one of the issue templates!Observations
./x.py test src/test/ui
worked fine before PR #97504 withremap-debuginfo = true
set inconfig.toml
./x.py test src/test/ui
stopped working after #97504 was merged.more concretely, the UI test
issue-71363
added in PR #97504 fails. the error message looks like the one that was reported by CI in the original PR #89268. see rust-log-analyzerdisabling
remap-debuginfo
makes testissue-71363
and the test suite pass:Hypotheses
-Z simulate-remapped-rust-src-base
is not working as intended withremap-debuginfo = true
.AIUI, the goal of
-Z simulate-remapped-rust-src-base=/rustc/xyz
is to make it as if there was norust-src
component installed but it's not working when the compiler is built withremap-debuginfo = true
. This can be observed in the above test failure: the location oftrait Error
is reported. It can also be observed on nightly (shown below):only removing the
rust-src
component makes thatpub trait
note disappear.issue-71363
is not being exercised withremap-debuginfo = true
in CIPR #97504 rebased PR #89268 but added
// only-x86_64-unknown-linux-gnu
. with that change theissue-71363
test is run in theauto (x86_64-gnu, ubuntu-20.04-xl)
builder which is configured with the default ofremap-debuginfo = false
. (see temporary logs)I couldn't figure where in the source code
remap-debuginfo
is set for CI builders but for exampleauto (dist-x86_64-linux, ubuntu-20.04-xl)
is configured withremap-debuginfo = true
(see temporary logs) but that builder does not run thesrc/test/ui
tests.OTOH,
auto (dist-i586-gnu-i586-i686-musl, ubuntu-20.04-xl)
is configured withremap-debuginfo = true
(see temporary logs) and does run thesrc/test/ui
tests. However, it will not runissue-71363
(see temp logs) because the test has a// only-x86_64-unknown-linux-gnu
directive. Thisdist-i586
builder is the one that failed in the original PR #89268 (again, see rust-log-analyzer); that original PR did not have the// only-
directive.Conclusions
-Z simulate-remapped-rust-src-base
is not working as intended withremap-debuginfo = true
.issue-71363
is a hazard because it will fail if theremap-debuginfo
configuration of the CI builders is tweaked in the futureSuggestions
I would suggest:
issue-71363
needs-test
. note that the actual issue is already fixed-Z simulate-remapped-rust-src-base
(or re-purporse this issue for that)issue-71363
once (3) is sorted outcc @JohnTitor (author of PR #97504)
The text was updated successfully, but these errors were encountered: