Skip to content

bootstrap: Rename Build to Session - #161600

Open
Zalathar wants to merge 2 commits into
rust-lang:mainfrom
Zalathar:session
Open

bootstrap: Rename Build to Session#161600
Zalathar wants to merge 2 commits into
rust-lang:mainfrom
Zalathar:session

Conversation

@Zalathar

Copy link
Copy Markdown
Member

Having separate types named Build and Builder is quite confusing, especially since build by itself isn't a very informative name in the context of a build system.

This PR therefore performs the change suggested in #161277 (comment), renaming Build to Session.

While session is not exactly the most descriptive name either, it at least has the virtue of being clearly distinct from builder. That should be helpful when trying to clarify the different roles of the two types.

There should be no change to bootstrap behaviour.

This renaming should at least make Session and Builder easier to distinguish.
@rustbot

rustbot commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

This PR changes how GCC is built. Consider updating src/bootstrap/download-ci-gcc-stamp.

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

This PR modifies src/bootstrap/src/core/config.

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

@rustbot rustbot added 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. labels Aug 23, 2026
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Aug 23, 2026
@rustbot

rustbot commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

r? @clubby789

rustbot has assigned @clubby789.
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

@Zalathar

Copy link
Copy Markdown
Member Author

I think there was originally an intention that Config would only contain information read from bootstrap.toml, and that Build/Session would then contain additional information discovered from the environment, such as tool paths and git information.

However, that's not really the case today, as there is quite a lot of environmental “impurity” in config loading/processing.

@Kobzol

Kobzol commented Aug 24, 2026

Copy link
Copy Markdown
Member

However, that's not really the case today, as there is quite a lot of environmental “impurity” in config loading/processing.

There used to be much more of it, and actually a large part of that has already been removed. But yeah, there is still some I/O happening during Config parsing, that could be removed in theory, but it would also complicate bootstrap's code a bit, so not sure if it's worth it anymore. Definitely download-ci-rustc should be moved out of there though.

@Kobzol

Kobzol commented Aug 24, 2026

Copy link
Copy Markdown
Member

You can r=me.

@Zalathar

Copy link
Copy Markdown
Member Author

r? Kobzol

@bors r=Kobzol

@rust-bors

rust-bors Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 287084b has been approved by Kobzol

It is now in the queue for this repository.

@rust-bors rust-bors Bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 24, 2026
@rustbot

rustbot commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Kobzol is not on the review rotation at the moment.
They may take a while to respond.

@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 24, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 24, 2026
bootstrap: Rename `Build` to `Session`

- Follow-up to rust-lang#161277
---

Having separate types named `Build` and `Builder` is quite confusing, especially since *build* by itself isn't a very informative name in the context of a build system.

This PR therefore performs the change suggested in rust-lang#161277 (comment), renaming `Build` to `Session`.

While *session* is not exactly the most descriptive name either, it at least has the virtue of being clearly distinct from *builder*. That should be helpful when trying to clarify the different roles of the two types.

There should be no change to bootstrap behaviour.
rust-bors Bot pushed a commit that referenced this pull request Aug 24, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #160132 (make `pad_i32` of `PassMode::cast` an integer)
 - #161600 (bootstrap: Rename `Build` to `Session`)
 - #161637 (Clarify token cursor behaviour)
 - #161653 (Add codegen test for Vec::clear lowering to an unconditional store)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 24, 2026
bootstrap: Rename `Build` to `Session`

- Follow-up to rust-lang#161277
---

Having separate types named `Build` and `Builder` is quite confusing, especially since *build* by itself isn't a very informative name in the context of a build system.

This PR therefore performs the change suggested in rust-lang#161277 (comment), renaming `Build` to `Session`.

While *session* is not exactly the most descriptive name either, it at least has the virtue of being clearly distinct from *builder*. That should be helpful when trying to clarify the different roles of the two types.

There should be no change to bootstrap behaviour.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 24, 2026
bootstrap: Rename `Build` to `Session`

- Follow-up to rust-lang#161277
---

Having separate types named `Build` and `Builder` is quite confusing, especially since *build* by itself isn't a very informative name in the context of a build system.

This PR therefore performs the change suggested in rust-lang#161277 (comment), renaming `Build` to `Session`.

While *session* is not exactly the most descriptive name either, it at least has the virtue of being clearly distinct from *builder*. That should be helpful when trying to clarify the different roles of the two types.

There should be no change to bootstrap behaviour.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 24, 2026
bootstrap: Rename `Build` to `Session`

- Follow-up to rust-lang#161277
---

Having separate types named `Build` and `Builder` is quite confusing, especially since *build* by itself isn't a very informative name in the context of a build system.

This PR therefore performs the change suggested in rust-lang#161277 (comment), renaming `Build` to `Session`.

While *session* is not exactly the most descriptive name either, it at least has the virtue of being clearly distinct from *builder*. That should be helpful when trying to clarify the different roles of the two types.

There should be no change to bootstrap behaviour.
rust-bors Bot pushed a commit that referenced this pull request Aug 24, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #161648 (`rust-analyzer` subtree update)
 - #160132 (make `pad_i32` of `PassMode::cast` an integer)
 - #160705 (Remove `From<!> for T` *reservation* impl)
 - #161600 (bootstrap: Rename `Build` to `Session`)
 - #161665 (delegation: add tests for delegations to inherent impls)
 - #161637 (Clarify token cursor behaviour)
 - #161653 (Add codegen test for Vec::clear lowering to an unconditional store)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants