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.

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

This comment has been minimized.

@erickt

erickt commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

This avoids installing the src component from the command line also
triggering 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 commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@davidv1992

davidv1992 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

@erickt I have made the requested change. That was the only remaining issue right?

@rustbot ready

@jieyouxu jieyouxu removed their assignment Sep 22, 2026
@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 22, 2026

This branch has not been deployed

No deployments
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-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-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