Skip to content

build-rust.py failure in CI: "fs::read_to_string(toml_file_name) failed with No such file or directory" #336

@nathanchance

Description

@nathanchance

A recent CI build fails with:

Submodule path 'library/backtrace': checked out '28ec93b503bf0410745bc3d571bf3dc1caac3019'

thread 'main' (305188) 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)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Panic was initiated from src/bootstrap/src/lib.rs:1683:20
Build completed unsuccessfully in 0:00:46
Traceback (most recent call last):
  File "/home/runner/work/tc-build/tc-build/build-rust.py", line 210, in <module>
    final.build()
  File "/home/runner/work/tc-build/tc-build/tc_build/rust.py", line 28, in build
    self.run_cmd([Path(self.folders.source, 'x.py'), 'install'], cwd=self.folders.build)
  File "/home/runner/work/tc-build/tc-build/tc_build/builder.py", line 54, in run_cmd
    return subprocess.run(
           ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '[PosixPath('/home/runner/work/tc-build/tc-build/src/rust/x.py'), 'install']' returned non-zero exit status 1.

I noticed this in my personal fork as well, so it does not seem to be transient. rust-lang/rust@bbdc7c4 is a recent change to src/bootstrap/src/lib.rs but we don't seem to be using dry run unless it is something internal to x.py. That change may be unrelated as well. Is there something that needs to be adjusted in build-rust.py / tc_build/rust.py @ojeda? Have you seen this before?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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