Skip to content

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

Closed
@rowan-sl

Description

@rowan-sl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions