Apply path remapping to imported source files and update tests#151741
Apply path remapping to imported source files and update tests#151741paradoxicalguy wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
@wesleywiser Currently the sysroot paths are now correctly remapped and i wanted to ask, should i update the failing test expectations as per the errors of this new behavior or would you suggest a different approach? eg scoping the fix to only sysroot files by checking for |
|
☔ The latest upstream changes (presumably #151778) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@workingjubilee will you be able to take hold of this pr and provide some guidance? |
|
|
|
OH, this was directly opposing your changes 😭, sorry about that |
|
Debian is on 1.92 atm, so it will be a while until I can report back |
|
i performed a test on Nightly to verify, waiting for debian side verification. |
|
I don't think so. The issue in #74786 is that debian is using a different (custom) prefix for Rust sources, which we don't support in bootstrap, so some patching is required on their side, unless we decide to support custom remap prefix one day. |
|
i was chasing a ghost😭 |
|
r? Urgau |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
closing this PR, |
Fixes issue #74786
this fix ensures that
new_imported_source_filerespects the--remap-path-prefixconfiguration.fix:
Changed
compiler/rustc_span/src/source_map.rsfile to interpret the filename beforeSourceFileis created.Now it:
RemapPathScopeComponents::DIAGNOSTICS.to_real_filename, ensuring consistent behavior.tests i ran:
./x.py test tests/ui --test-args remapwith--blessafter building compiler with std lib in WSL ubuntu.tests/ui/errors/*.stderrto reflect the correct remapped paths.tests/ui/errors/remap-path-prefix-reverse.rsto remove an error pattern check that relied on the bug.