Skip to content
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

Rename config.toml to bootstrap.toml #127791

Closed
wants to merge 1 commit into from

Conversation

LuuuXXX
Copy link
Contributor

@LuuuXXX LuuuXXX commented Jul 16, 2024

What does this PR try to resolve?

Cargo and bootstrap use the same name for their configuration file. this is confusing.

This pr attempts to disambiguate the naming, makes it easier to understand.

cc #126875

note: config.toml is still supported, so this doesn't break the downstreams.

@rustbot
Copy link
Collaborator

rustbot commented Jul 16, 2024

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

@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations 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. labels Jul 16, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jul 16, 2024

This PR modifies src/bootstrap/defaults.

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

triagebot.toml has been modified, there may have been changes to the review queue.

cc @davidtwco, @wesleywiser

Some changes occurred in src/doc/rustc/src/platform-support

cc @Nilstrieb

Some changes occurred in src/doc/unstable-book/src/compiler-flags/control-flow-guard.md

cc @rust-lang/project-exploit-mitigations, @rcvalle

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.

@bors
Copy link
Contributor

bors commented Jul 19, 2024

☔ The latest upstream changes (presumably #127936) made this pull request unmergeable. Please resolve the merge conflicts.

@Mark-Simulacrum
Copy link
Member

r? bootstrap

Copy link
Member

@onur-ozkan onur-ozkan left a comment

Choose a reason for hiding this comment

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

We should do the similar work on https://github.com/rust-lang/rustc-dev-guide too before landing this one.

@@ -1305,22 +1305,27 @@ impl Config {

config.stage0_metadata = build_helper::stage0_parser::parse_stage0_file();

// Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./config.toml`, then `config.toml` in the root directory.
// Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./bootstrap.toml`, then `bootstrap.toml`, then `config.toml` in the root directory.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./bootstrap.toml`, then `bootstrap.toml`, then `config.toml` in the root directory.
// Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./bootstrap.toml` or `./config.toml`, then `bootstrap.toml` or `config.toml` in the root directory.

Comment on lines 1314 to 1323
let mut toml_path = toml_path.unwrap_or_else(|| PathBuf::from("config.toml"));
let mut toml_path = toml_path.unwrap_or_else(|| PathBuf::from("bootstrap.toml"));
if using_default_path && !toml_path.exists() {
toml_path = config.src.join(toml_path);
let bootstrap_toml_path = config.src.join(toml_path);
if !bootstrap_toml_path.exists() {
toml_path = config.src.join(PathBuf::from("config.toml"));
} else {
toml_path = bootstrap_toml_path;
}
Copy link
Member

Choose a reason for hiding this comment

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

This only handles config.toml from the root directory and it will break when config.toml is present in the current directory when x is invoked from outside of project root.

@@ -173,7 +173,7 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
ChangeInfo {
change_id: 123711,
severity: ChangeSeverity::Warning,
summary: "The deprecated field `changelog-seen` has been removed. Using that field in `config.toml` from now on will result in breakage.",
summary: "The deprecated field `changelog-seen` has been removed. Using that field in `bootstrap.toml` from now on will result in breakage.",
Copy link
Member

Choose a reason for hiding this comment

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

We should revert the current changes in change_tracker.rs and add a new change entry to inform people about this renaming work.

@onur-ozkan
Copy link
Member

@rustbot author

@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 Jul 21, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@LuuuXXX LuuuXXX force-pushed the issue-126875 branch 2 times, most recently from 151cae0 to 5b8b787 Compare July 25, 2024 03:08
@LuuuXXX LuuuXXX force-pushed the issue-126875 branch 2 times, most recently from b1d19c8 to f1e923a Compare July 25, 2024 06:45
@bors
Copy link
Contributor

bors commented Jul 26, 2024

☔ The latest upstream changes (presumably #120593) made this pull request unmergeable. Please resolve the merge conflicts.

@lolbinarycat lolbinarycat added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 30, 2024
@lolbinarycat
Copy link
Contributor

@LuuuXXX still interested in working on this?

@alex-semenyuk
Copy link
Member

@LuuuXXX
Form wg-triage. Closed this PR due to inactivity. Feel free to reopen or raised new one. Thanks for your efforts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations 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.

8 participants