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

using RUST_BOOSTRAP_CONFIG to configure x.py can break boostrap tests #120202

Closed
rowan-sl opened this issue Jan 21, 2024 · 2 comments · Fixed by #120207
Closed

using RUST_BOOSTRAP_CONFIG to configure x.py can break boostrap tests #120202

rowan-sl opened this issue Jan 21, 2024 · 2 comments · Fixed by #120207
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@rowan-sl
Copy link
Contributor

When setting RUST_BOOTSTRAP_CONFIG (for x.py) to a path that doesn't end in a file named config.toml (or config.dist.toml) the bootstrap test profile_user_dist fails, due to explicitly asserting that the config file has one of these names

(test is src/bootstrap/src/tests/config.rs:175)

This could be indicitive of a larger issue, as Config::parse_inner which is used in many bootstrap tests seems to rely on a concerning amount of external state (this could cause more issues in the future if not resolved, and/or make bootstrap's tests fail when a users config is invalid)

If this behavior is intentional, there is a bug in rustc_dev_guide, because the recommended shell.nix sets RUST_BOOTSTRAP_CONFIG=/nix/store/some/path/rustc-config which triggers this bug

Alternately, ./x.py could emit an error if RUST_BOOTSTRAP_CONFIG is set to an invalid path, with a suggestion on how to fix it (though this seems like a questionable fix)

@rustbot label +C-bug +T-bootstrap

@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 21, 2024
@rowan-sl
Copy link
Contributor Author

if rust-lang/rustc-dev-guide#1858 is accepted, this would be somewhat lower priority (though not fixed)

@onur-ozkan onur-ozkan removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 21, 2024
@onur-ozkan
Copy link
Member

If this behavior is intentional

No, it's not. It's just a logical bug in the test that I will fix quickly.

@onur-ozkan onur-ozkan linked a pull request Jan 21, 2024 that will close this issue
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jan 30, 2024
check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test

Fixes a logical bug in `profile_user_dist` test (explained in rust-lang#120202).
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 30, 2024
check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test

Fixes a logical bug in `profile_user_dist` test (explained in rust-lang#120202).
Nadrieril added a commit to Nadrieril/rust that referenced this issue Jan 31, 2024
check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test

Fixes a logical bug in `profile_user_dist` test (explained in rust-lang#120202).
Nadrieril added a commit to Nadrieril/rust that referenced this issue Jan 31, 2024
check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test

Fixes a logical bug in `profile_user_dist` test (explained in rust-lang#120202).
Nadrieril added a commit to Nadrieril/rust that referenced this issue Jan 31, 2024
check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test

Fixes a logical bug in `profile_user_dist` test (explained in rust-lang#120202).
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 31, 2024
Rollup merge of rust-lang#120207 - onur-ozkan:120202-fix, r=clubby789

check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test

Fixes a logical bug in `profile_user_dist` test (explained in rust-lang#120202).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants