Rust: #73317 causes `./x.py` to fail on my Mojave macOS

Created on 21 Jun 2020  路  4Comments  路  Source: rust-lang/rust

I tried this code:

./x.py check

I expected to see this happen: rust to check the compilation of itself.

Instead, this happened: thread 'main' panicked at 'fs::read_to_string(&file)

Meta

This seems to be caused by https://github.com/rust-lang/rust/pull/73317
specifically commit 93022be9917a472f7a16410ce7cb2b76a5d3afdd
based on a git bisect


Backtrace

Updating only changed submodules
Submodules updated in 0.05 seconds
    Finished dev [unoptimized] target(s) in 0.15s
thread 'main' panicked at 'fs::read_to_string(&file) failed with No such file or directory (os error 2)', src/bootstrap/config.rs:447:32
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: std::panicking::rust_panic_with_hook
   6: rust_begin_unwind
   7: std::panicking::begin_panic_fmt
   8: bootstrap::config::Config::parse::{{closure}}
   9: core::option::Option<T>::map
  10: bootstrap::config::Config::parse
  11: bootstrap::main
  12: std::rt::lang_start::{{closure}}
  13: std::rt::lang_start_internal
  14: std::rt::lang_start
  15: main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
failed to run: /Users/dantebroggi/Documents/GitHub/rust-test/build/bootstrap/debug/bootstrap -i build
Build completed unsuccessfully in 0:00:00

A-rustbuild C-bug

Most helpful comment

Sorry about this folks, filed #73590 with a fix.

All 4 comments

Hm, cc @davidtwco

I suspect that maybe we're not doing the right thing if the file doesn't exist (using default values in that case)?

I have the exact same problem

I suspect that this can be solved with touch config.toml for the time being.

Sorry about this folks, filed #73590 with a fix.

Was this page helpful?
0 / 5 - 0 ratings