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

./x.py fmt is not supported on this channel when not using stage0 toolchain rustc #78440

Closed
tesuji opened this issue Oct 27, 2020 · 3 comments
Closed
Labels
C-bug Category: This is a bug. 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.

Comments

@tesuji
Copy link
Contributor

tesuji commented Oct 27, 2020

I'm using nightly toolchain as toolchain to build bootstrap compiler with this config:

[build]
cargo = "/home/lzutao/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo"
rustc = "/home/lzutao/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc"
#rustfmt = "/path/to/bin/rustfmt"

But I cannot use ./x.py fmt to use always-downloaded stage0 rustfmt to format code.
Instead I have this error from x.py:

$ ./x.py fmt
    Finished dev [unoptimized + debuginfo] target(s) in 0.25s
./x.py fmt is not supported on this channel

I'm working on main commits 20b1e05 .

Meta

rustc +nightly --version --verbose:

rustc 1.49.0-nightly (4760b8fb8 2020-10-25)
binary: rustc
commit-hash: 4760b8fb886a3702ae11bfa7868d495b2675b5ed
commit-date: 2020-10-25
host: x86_64-unknown-linux-gnu
release: 1.49.0-nightly
LLVM version: 11.0

@rustbot modify labels: T-infra

@tesuji tesuji added the C-bug Category: This is a bug. label Oct 27, 2020
@rustbot rustbot added the T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. label Oct 27, 2020
@jyn514 jyn514 added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Oct 27, 2020
@Mark-Simulacrum
Copy link
Member

You can "fix" this by manually setting the rustfmt path to the binary in build/.../stage0/bin/rustfmt. It can be fixed in rustbuild by explicitly threading the rustfmt path from python into Rust (or adding a fallback to look in the build/.../stage0/bin/ directory, which is probably harder but better in some sense).

@shepmaster
Copy link
Member

I made some changes that might address this in #78842

@Enselic
Copy link
Member

Enselic commented Dec 16, 2023

Triage: No one said "that didn't help", so I will assume it did. Closing as fixed.

@Enselic Enselic closed this as completed Dec 16, 2023
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) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants