Closed rautyrauty closed 3 months ago
Could you add some more context about what you are doing? What crate are you trying to read the file from, or what is your end goal? I suspect it just isn't running from where you expect it, try printing Sorry about that, I missed that you were just running std::env::current_dir()
to figure out where it's running from. Or include_str!
if you are just trying to read it once.x.py build
and thought you were attempting to modify bootstrap.
(FYI if you are working on developing rust-lang things, https://rust-lang.zulipchat.com/ can be a good place to go for help).
Mentioning @onur-ozkan, as I'm guessing this would bisect to https://github.com/rust-lang/rust/pull/125181.
config.src.join("src/ci/channel")
should be pointing to $project_root/src/ci/channel
and the channel
file should be there by default.
Try adding dbg!(config.src.join("src/ci/channel"));
right above of https://github.com/rust-lang/rust/blob/a526d7ce45fd2284e0e7c7556ccba2425b9d25e5/src/bootstrap/src/core/config/config.rs#L1319
and run ./x.py build --dry-run
.
From my side, everything works as expected:
~/downloads/rustc-1.80.0-src $ ./x.py build --dry-run
Building bootstrap
Compiling bootstrap v0.0.0 (/home/nimda/downloads/rustc-1.80.0-src/src/bootstrap)
Finished `dev` profile [unoptimized] target(s) in 3.31s
[src/core/config/config.rs:1319:9] config.src.join("src/ci/channel") = "/home/nimda/downloads/rustc-1.80.0-src/src/ci/channel"
WARNING: you have not made a `config.toml`
HELP: consider running `./x.py setup` or copying `config.example.toml` by running `cp config.example.toml config.toml`
Building stage0 library artifacts (x86_64-unknown-linux-gnu)
Building LLVM for x86_64-unknown-linux-gnu
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Building stage1 library artifacts (x86_64-unknown-linux-gnu)
WARNING: no codegen-backends config matched the requested path to build a codegen backend. HELP: add backend to codegen-backends in config.toml.
Building tool rustdoc (stage0 -> stage1, x86_64-unknown-linux-gnu)
WARNING: you have not made a `config.toml`
HELP: consider running `./x.py setup` or copying `config.example.toml` by running `cp config.example.toml config.toml`
NOTE: this message was printed twice to make it more likely to be seen
Build completed successfully in 0:00:03
Thanks everyone. I will continue to deal with this issue on Monday.
My fault. I have not sent src/ci to the build environment for several years, since I do not use CI tools.
After upgrading from 1.79.0 to 1.80.0, a build error appeared.
$ cat config.toml
last lines of $ RUST_BACKTRACE=full python3 x.py build
build.log
cp src/ci/channel src/bootstrap/src/ci/channel
didn't help. Please tell me how to fix it.