Skip to content

Rename the src install build step to rust-src. - #162423

Open
davidv1992 wants to merge 1 commit into
rust-lang:mainfrom
davidv1992:install-rust-src
Open

davidv1992 wants to merge 1 commit into
rust-lang:mainfrom
davidv1992:install-rust-src

Conversation

@davidv1992

@davidv1992 davidv1992 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

View all comments

This avoids installing the src component from the command line also triggering installing a whole lot of other things which are behind the src path. Furthermore, it makes the name match the component as distributed in rustup, reducing confusion.

@rustbot rustbot added 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) labels Sep 7, 2026
@rustbot

rustbot commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789, jieyouxu

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Mark-Simulacrum Mark-Simulacrum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This also should be documented in the bootstrap changelog (https://github.com/rust-lang/rust/blob/20d35a3ae8f310f2a002e5f6e0bc583830010cd4/src/bootstrap/src/utils/change_tracker.rs). I don't think we support a good way to soft-deprecate so probably just changing this is OK? I'll mark @rustbot label +relnotes, so we can call it out as a compatibility note though.

View changes since this review


fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src")
run.alias("rust-src")

@Mark-Simulacrum Mark-Simulacrum Sep 13, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this will break

SKIP_SRC := --skip=src
-- can you fix that up? And look for some other cases of it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed it, and fixed the remaining 4 occurrences I could find. I have taken the approach of everywhere src is used, it is intentional that rust-src is included, but given the size of the src directory, this may not always be the case, so if someone with more domain knowledge can take a look that would be great.

@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 Sep 13, 2026
@rustbot

rustbot commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot

rustbot commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Error: Unknown labels: a, as, call, can, compatibility, it, note, out, so, though, we

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip.

@Mark-Simulacrum Mark-Simulacrum added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 14, 2026
@rustbot

rustbot commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Warning

If you are changing how CI LLVM is built or linked, make sure to bump
src/bootstrap/download-ci-llvm-stamp.

cc @jieyouxu

This PR modifies bootstrap.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Sep 16, 2026
@davidv1992

Copy link
Copy Markdown
Contributor Author

Since rustbot added you into the conversation: @jieyouxu, there is technically a change to a default value in the bootstrap configuration, as rust-src is now its own thing rather than part of src. However, the default behavior of build.tools does not change, rust-src is built when extended=true in both the old and new situation. Should I still add an entry to CONFIG_CHANGE_HISTORY?

@davidv1992

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 16, 2026
@jieyouxu

jieyouxu commented Sep 16, 2026

Copy link
Copy Markdown
Member

I think that can't hurt, just in case. (Also that cc is actually for the CI changes not the bootstrap changes, but yeah anyway 😆)

@davidv1992

Copy link
Copy Markdown
Contributor Author

Ok, Added the entry as a warning.

@@ -324,12 +324,12 @@ impl CommandLineStep for Src {
const IS_HOST: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src")
run.alias("rust-src")

@jieyouxu jieyouxu Sep 16, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

cc @Kobzol as well, in case you know of an edge case for this alias.

EDIT: ah, but this is an install alias, which I am much less worried about (as opposed to build/dist aliases).

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Left some comments. I think that @Mark-Simulacrum's comment wasn't correct.

Comment thread bootstrap.example.toml Outdated
Comment thread src/bootstrap/src/utils/change_tracker.rs Outdated
Comment thread src/ci/github-actions/jobs.yml Outdated
Comment thread src/ci/github-actions/jobs.yml Outdated
Comment thread src/ci/docker/scripts/stage_2_test_set1.sh Outdated
Comment thread src/bootstrap/mk/Makefile.in Outdated
@rust-log-analyzer

This comment has been minimized.

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 18, 2026
…k-simulacrum,jieyouxu,kobzol

Rename the src install build step to rust-src.

This avoids installing the src component from the command line also triggering installing a whole lot of other things which are behind the src path. Furthermore, it makes the name match the component as distributed in rustup, reducing confusion.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 18, 2026
…k-simulacrum,jieyouxu,kobzol

Rename the src install build step to rust-src.

This avoids installing the src component from the command line also triggering installing a whole lot of other things which are behind the src path. Furthermore, it makes the name match the component as distributed in rustup, reducing confusion.
rust-bors Bot pushed a commit that referenced this pull request Sep 18, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #160401 (sparc: make ABI consistent with clang)
 - #161777 (Add Natvis visualiser and debuginfo tests for `f128`)
 - #162423 (Rename the src install build step to rust-src.)
 - #162740 (stdarch subtree update)
 - #162824 (link Enzyme and the offload with in-tree lld if possible)
 - #162832 (add `Div` and `Mul` for `Complex<{float}>`)
 - #161005 (fix: unfulfilled nested dead code lint)
 - #161803 (Fix docs of make_ascii_lowercase/make_ascii_upercase)
 - #162256 (Add mentions to sync back `RELEASES.md` to the `main` branch)
 - #162661 (simplify `Target::GenericParam`)
 - #162666 (Tidy footnote in `platform-support.md`)
 - #162803 (docs(num): add documentation for `NonZero::from_str`)
 - #162906 (Move more `rustdoc-html` tests in the right location)
 - #162922 (An assortment of polonius tweaks)
 - #162930 (Use niche length type for strlen to guarantee `isize::MAX` bound)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 18, 2026
…k-simulacrum,jieyouxu,kobzol

Rename the src install build step to rust-src.

This avoids installing the src component from the command line also triggering installing a whole lot of other things which are behind the src path. Furthermore, it makes the name match the component as distributed in rustup, reducing confusion.
rust-bors Bot pushed a commit that referenced this pull request Sep 18, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #160401 (sparc: make ABI consistent with clang)
 - #161777 (Add Natvis visualiser and debuginfo tests for `f128`)
 - #162423 (Rename the src install build step to rust-src.)
 - #162740 (stdarch subtree update)
 - #162824 (link Enzyme and the offload with in-tree lld if possible)
 - #161005 (fix: unfulfilled nested dead code lint)
 - #161803 (Fix docs of make_ascii_lowercase/make_ascii_upercase)
 - #162256 (Add mentions to sync back `RELEASES.md` to the `main` branch)
 - #162661 (simplify `Target::GenericParam`)
 - #162666 (Tidy footnote in `platform-support.md`)
 - #162803 (docs(num): add documentation for `NonZero::from_str`)
 - #162906 (Move more `rustdoc-html` tests in the right location)
 - #162922 (An assortment of polonius tweaks)
 - #162929 (Update unicode_data to Unicode version 18.0.0)
 - #162930 (Use niche length type for strlen to guarantee `isize::MAX` bound)
@jieyouxu

Copy link
Copy Markdown
Member

One moment.
@bors r-
@bors try jobs=test_x86_64-fuchsia

@rust-bors rust-bors Bot 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 Sep 18, 2026
@rust-bors

This comment was marked as off-topic.

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 18, 2026
Rename the src install build step to rust-src.


try-job: test_x86_64-fuchsia
@rust-log-analyzer

This comment was marked as off-topic.

@rust-bors

This comment was marked as off-topic.

@jieyouxu jieyouxu self-assigned this Sep 18, 2026
@jieyouxu

Copy link
Copy Markdown
Member

@bors try jobs=test-x86_64-fuchsia

@rust-bors

This comment has been minimized.

@jieyouxu

Copy link
Copy Markdown
Member

@bors rollup=never note="modifies ./x install logic"

@jieyouxu jieyouxu added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 18, 2026
@rust-bors rust-bors Bot 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 Sep 18, 2026
@rust-bors

rust-bors Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

💔 Test for bc11f45 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-x86_64-fuchsia failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

##[endgroup]
[TIMING:end] install::Docs { build_compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu, forced_compiler: false }, target: x86_64-unknown-linux-gnu } -- 0.111
Build completed successfully in 0:14:01
+ find /checkout/obj/install/lib/rustlib/aarch64-unknown-fuchsia/lib /checkout/obj/install/lib/rustlib/riscv64gc-unknown-fuchsia/lib /checkout/obj/install/lib/rustlib/x86_64-unknown-fuchsia/lib -type f -name '*.so' -exec sh -c $'/usr/local/bin/llvm-objcopy --only-keep-debug "$1" "$1.debug" && \\\n        /usr/local/bin/llvm-objcopy --strip-all --keep-section=.rustc "$1"' _ '{}' ';'
+ bash ../src/ci/docker/host-x86_64/test-x86_64-fuchsia/build-fuchsia.sh
+ '[' -z '' ']'
+ curl --retry 10 -s 'https://fuchsia.googlesource.com/jiri/+/HEAD/scripts/bootstrap_jiri?format=TEXT'
+ base64 --decode
+ bash -s fuchsia
---
+ cd fuchsia
+ .jiri_root/bin/jiri init -partial-filter=tree:0 -analytics-opt=false .
+ .jiri_root/bin/jiri import -name=integration -revision=be532c365aa6ba56b08ed684c0f8bb71960c18fd -overwrite=true flower https://fuchsia.googlesource.com/integration
+ '[' -d .git ']'
+ .jiri_root/bin/jiri -j=10 update -autoupdate=false -attempts 10 -package-to-skip 'fuchsia/third_party/rust/host/${platform}' -package-to-skip fuchsia/third_party/rust/target/aarch64-apple-darwin -package-to-skip fuchsia/third_party/rust/target/aarch64-unknown-linux-gnu -package-to-skip fuchsia/third_party/rust/target/fuchsia -package-to-skip fuchsia/third_party/rust/target/riscv64gc-unknown-linux-gnu -package-to-skip fuchsia/third_party/rust/target/wasm32-unknown-unknown -package-to-skip fuchsia/third_party/rust/target/x86_64-apple-darwin -package-to-skip fuchsia/third_party/rust/target/x86_64-unknown-linux-gnu
[15:54:29.625] Updating all projects
[15:58:09.974] Fetching CIPD packages
[P54929 15:58:10.080 action_plan.go:259 I] Going to install 120 packages
[P54929 15:58:10.080 action_plan.go:178 I] In subdir "prebuilt/connectivity/bluetooth/bt-hci-virtual/arm64":
[P54929 15:58:10.080 action_plan.go:182 I]   to install:
---
[P54929 15:58:10.081 action_plan.go:184 I]     fuchsia/infra/zedmon/linux-amd64:8bOD87VKTLXbshNJ8LvFb_MC1lsEbobbv1f1bHhRA3gC
[P54929 15:58:10.081 action_plan.go:178 I] In subdir "prebuilt/virtualization/packages/aosp_gki":
[P54929 15:58:10.081 action_plan.go:182 I]   to install:
[P54929 15:58:10.081 action_plan.go:184 I]     fuchsia/third_party/aosp_gki/virt:kTGf9yslZgbbciD1PqQ9cRSLOx9hdpuWtcqam7Wx13QC
[P54929 15:58:10.083 instancecache.go:257 I] Using temporary instance cache at /checkout/obj/fuchsia/.cipd/tmp/dl_3826218342
[P54929 15:58:10.083 client.go:2104 I] [fetch   1/119] Resolving fetch URL for fuchsia/prebuilt/bt-hci-virtual/arm64:0v8c2B15yFtrz3VZCf9j0xxrCwRnrTLxfXnergt-lRQC
[P54929 15:58:10.175 storage.go:276 I] [fetch   1/119] Connecting...
[P54929 15:58:10.356 activities.go:174 I] [fetch   1/119] Fetching: 0.0/1.3 MB (  0%)
[P54929 15:58:10.468 client.go:2089 I] [fetch   1/119] Fetched fuchsia/prebuilt/bt-hci-virtual/arm64:0v8c2B15yFtrz3VZCf9j0xxrCwRnrTLxfXnergt-lRQC in 0.4s
[P54929 15:58:10.469 deployer.go:304 I] [unzip   1/119] Deploying fuchsia/prebuilt/bt-hci-virtual/arm64:0v8c2B15yFtrz3VZCf9j0xxrCwRnrTLxfXnergt-lRQC into /checkout/obj/fuchsia(/prebuilt/connectivity/bluetooth/bt-hci-virtual/arm64)
---
[P54929 15:58:47.521 deployer.go:407 I] [unzip 102/119] Cleaning up...
[P54929 15:58:47.522 deployer.go:413 I] [unzip 102/119] Deployed chromium/fuchsia/web_engine/arm64/tests:olbQ-sNFkZNCSDkY6ardUGwHqYD5pLwb80BSK662UxcC in 1.3s
[P54929 15:58:47.559 client.go:2408 I] All changes applied.
[15:58:47.638] WARN: Some packages are skipped by cipd due to lack of access, you might want to run "/checkout/obj/fuchsia/.jiri_root/bin/cipd auth-login" and try again
[15:58:49.254] Running package garbage collection in cache /checkout/obj/fuchsia/.jiri_root/packages with threshold 168h0m0s
[15:58:49.750] WARN: Empty hash file found at /checkout/obj/fuchsia/build/sdk/generate_prebuild_idk/validation_data/input_fuchsia_dir/prebuilt/fake_tool/x64/.jiri_cache_hash
++ git -C integration rev-parse HEAD
integration commit = be532c365aa6ba56b08ed684c0f8bb71960c18fd
+ echo integration commit = be532c365aa6ba56b08ed684c0f8bb71960c18fd
+ bash scripts/rust/build_fuchsia_from_rust_ci.sh
Metrics collection is already disabled.
---

+ echo
+ set +e
+ /checkout/obj/fuchsia/scripts/../.jiri_root/bin/fx clippy --all
ninja: Entering directory `/checkout/obj/fuchsia/out/workbench_eng.x64-balanced'
ninja: error: '/checkout/obj/install/lib/rustlib/src/rust/library/core/src/lib.rs', needed by 'kernel_x64.lk_debug_level_0/obj/zircon/kernel/lib/rust/libcore.rlib', missing and no known rule to make it

Clippy Diagnostics
==================

0 warning(s) emitted

Important

For more information how to resolve CI failures of this job, visit this link.

@erickt

erickt commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants