Closed rbtcollins closed 1 month ago
I ran into this as well, this is a (bad) error message indicating that you need to specify
startup --windows_enable_symlinks
build --enable_runfiles
in your .bazelrc, so that the runfiles directory is properly filled. Otherwise, the directory cargo_build_script
wants to build in doesn't exist, and you get this error.
I ran into this as well, this is a (bad) error message indicating that you need to specify
startup --windows_enable_symlinks build --enable_runfiles
in your .bazelrc, so that the runfiles directory is properly filled. Otherwise, the directory
cargo_build_script
wants to build in doesn't exist, and you get this error.
I believe this is indeed the root cause so I'll close this in favor of https://github.com/bazelbuild/rules_rust/issues/1156. If that's not the case though feel free to reopen!
I don't know how broadly yet, so I guess my next step is to figure out how to use a git version of rules_rust.
Here is what I know so far.
bazel build ... is trying to run build scripts for dependencies of prost for a
rust_prost_library
, and failing at https://github.com/bazelbuild/rules_rust/blob/b96e37ecf435d032435ad66f547a6599a16467d2/cargo/cargo_build_script_runner/lib.rs#L127-L128 withOs { code: 267, kind: NotADirectory, message: "The directory name is invalid." }
The build script runner code doesn't annotate the panic with any context such as directory, binary, etc, and as its a panic we just get the unwind stack, which in an optimised binary can be quite opaque - see below.
I couldn't see any logging or tracing telemetry in the script either, so debugging routes aren't immediately obvious.
Details that might or might not be relevant.
In
~/.bazelrc
:In
.bazelrc
:In
third-party/plugin-proto/BUILD.bazel
:In
third-party/plugin-proto/deps.bzl
: