Skip to content

./x.py install panics on a fresh clone #156408

@ojeda

Description

@ojeda

Since commit bbdc7c4 ("bootstrap: Don't clone submodules unconditionally in dry-run"), this panics:

git clone https://github.com/rust-lang/rust && cd rust && ./configure && ./x.py install

with:

thread 'main' panicked at src/bootstrap/src/lib.rs:1683:20:
fs::read_to_string(toml_file_name) failed with No such file or directory (os error 2)

But this does not:

git clone https://github.com/rust-lang/rust && cd rust && ./configure && ./x.py build

The reason is that the Cargo submodule is not ready early enough.

This affects tools like tc-build: ClangBuiltLinux/tc-build#336 (originally reported by @nathanchance).

Cc @jyn514 @jieyouxu

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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions