Skip to content

Try unremapping compiler sources #142377

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Jun 11, 2025

See #t-compiler/help > Span pointing to wrong file location (rustc-dev component).

This PR is a follow-up to #141751 regarding the compiler side.

Specifically we now take into account the CFG_VIRTUAL_RUSTC_DEV_SOURCE_BASE_DIR env from #141751 when trying to unremap sources from $sysroot/lib/rustlib/rustc-src/rust (the rustc-dev component install directory).

Best reviewed commit by commit.

cc @samueltardieu
r? @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 11, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 11, 2025

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@Urgau Urgau force-pushed the unremap-rustc-dev branch from 2d8394a to 7c1d47a Compare June 11, 2025 18:30
@bors

This comment was marked as resolved.

@Urgau Urgau force-pushed the unremap-rustc-dev branch from 7c1d47a to 5dca84f Compare June 12, 2025 16:50
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One doc nit, but impl seems good to me. Thanks for working on this!

@jieyouxu
Copy link
Member

@rustbot author (doc nit)

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 14, 2025
@Urgau Urgau force-pushed the unremap-rustc-dev branch from 5dca84f to 2341c7d Compare June 14, 2025 13:28
@rustbot rustbot added the A-rustc-dev-guide Area: rustc-dev-guide label Jun 14, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 14, 2025

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @jieyouxu, @Kobzol

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, r=me once PR CI is 🥗

@Urgau
Copy link
Member Author

Urgau commented Jun 14, 2025

@bors r=jieyouxu

@bors
Copy link
Collaborator

bors commented Jun 14, 2025

📌 Commit 2341c7d has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 14, 2025
fmease added a commit to fmease/rust that referenced this pull request Jun 14, 2025
Try unremapping compiler sources

See [#t-compiler/help > Span pointing to wrong file location (`rustc-dev` component)](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Span.20pointing.20to.20wrong.20file.20location.20.28.60rustc-dev.60.20component.29/with/521087083).

This PR is a follow-up to rust-lang#141751 regarding the compiler side.

Specifically we now take into account the `CFG_VIRTUAL_RUSTC_DEV_SOURCE_BASE_DIR` env from rust-lang#141751 when trying to unremap sources from `$sysroot/lib/rustlib/rustc-src/rust` (the `rustc-dev` component install directory).

Best reviewed commit by commit.

cc `@samueltardieu`
r? `@jieyouxu`
bors added a commit that referenced this pull request Jun 15, 2025
Rollup of 10 pull requests

Successful merges:

 - #133952 (Remove wasm legacy abi)
 - #134661 (Reduce precedence of expressions that have an outer attr)
 - #141769 (Move metadata object generation for dylibs to the linker code )
 - #141864 (Handle win32 separator for cygwin paths)
 - #142347 (Async drop - fix for StorageLive/StorageDead codegen for pinned future)
 - #142377 (Try unremapping compiler sources)
 - #142389 (Apply ABI attributes on return types in `rustc_codegen_cranelift`)
 - #142470 (Add some missing mailmap entries)
 - #142481 (Add `f16` inline asm support for LoongArch)
 - #142509 (bump std libc dependency)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 15, 2025
Try unremapping compiler sources

See [#t-compiler/help > Span pointing to wrong file location (`rustc-dev` component)](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Span.20pointing.20to.20wrong.20file.20location.20.28.60rustc-dev.60.20component.29/with/521087083).

This PR is a follow-up to rust-lang#141751 regarding the compiler side.

Specifically we now take into account the `CFG_VIRTUAL_RUSTC_DEV_SOURCE_BASE_DIR` env from rust-lang#141751 when trying to unremap sources from `$sysroot/lib/rustlib/rustc-src/rust` (the `rustc-dev` component install directory).

Best reviewed commit by commit.

cc ``@samueltardieu``
r? ``@jieyouxu``
bors added a commit that referenced this pull request Jun 15, 2025
Rollup of 9 pull requests

Successful merges:

 - #133952 (Remove wasm legacy abi)
 - #141769 (Move metadata object generation for dylibs to the linker code )
 - #141864 (Handle win32 separator for cygwin paths)
 - #142347 (Async drop - fix for StorageLive/StorageDead codegen for pinned future)
 - #142377 (Try unremapping compiler sources)
 - #142389 (Apply ABI attributes on return types in `rustc_codegen_cranelift`)
 - #142470 (Add some missing mailmap entries)
 - #142481 (Add `f16` inline asm support for LoongArch)
 - #142509 (bump std libc dependency)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr
Copy link
Member

@bors r-
#142533 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 15, 2025
@Urgau Urgau force-pushed the unremap-rustc-dev branch from 2341c7d to 268fbfe Compare June 15, 2025 15:20
@Urgau
Copy link
Member Author

Urgau commented Jun 15, 2025

Added an ignore-stage1 like many other ui-fulldeps tests have, let's see if it fixes the CI failure.

@bors2 try jobs=x86_64-gnu-llvm-20-3

@rust-bors

This comment was marked as outdated.

@Urgau

This comment was marked as outdated.

@rust-bors

This comment was marked as outdated.

@Urgau

This comment was marked as outdated.

@rust-bors

This comment was marked as outdated.

@Urgau
Copy link
Member Author

Urgau commented Jun 15, 2025

@bors2 try jobs=x86_64-gnu-llvm-20-3

@rust-bors
Copy link

rust-bors bot commented Jun 15, 2025

⌛ Trying commit 268fbfe with merge da6d304

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 15, 2025
Try unremapping compiler sources

See [#t-compiler/help > Span pointing to wrong file location (`rustc-dev` component)](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Span.20pointing.20to.20wrong.20file.20location.20.28.60rustc-dev.60.20component.29/with/521087083).

This PR is a follow-up to #141751 regarding the compiler side.

Specifically we now take into account the `CFG_VIRTUAL_RUSTC_DEV_SOURCE_BASE_DIR` env from #141751 when trying to unremap sources from `$sysroot/lib/rustlib/rustc-src/rust` (the `rustc-dev` component install directory).

Best reviewed commit by commit.

cc `@samueltardieu`
r? `@jieyouxu`

try-job: x86_64-gnu-llvm-20-3
@rust-bors
Copy link

rust-bors bot commented Jun 15, 2025

☀️ Try build successful (CI)
Build commit: da6d304 (da6d3040873ac092c5069887b1ccf943806d2b76, parent: 75e7cf5f85aad82331a38deff24845b63eaf30f3)

@Urgau
Copy link
Member Author

Urgau commented Jun 15, 2025

@bors r=jieyouxu

@bors
Copy link
Collaborator

bors commented Jun 15, 2025

📌 Commit 268fbfe has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 15, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 17, 2025
Try unremapping compiler sources

See [#t-compiler/help > Span pointing to wrong file location (`rustc-dev` component)](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Span.20pointing.20to.20wrong.20file.20location.20.28.60rustc-dev.60.20component.29/with/521087083).

This PR is a follow-up to rust-lang#141751 regarding the compiler side.

Specifically we now take into account the `CFG_VIRTUAL_RUSTC_DEV_SOURCE_BASE_DIR` env from rust-lang#141751 when trying to unremap sources from `$sysroot/lib/rustlib/rustc-src/rust` (the `rustc-dev` component install directory).

Best reviewed commit by commit.

cc `@samueltardieu`
r? `@jieyouxu`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants