Open bbstilson opened 11 months ago
Actually, I can't seem to build anything.
.
├── BUILD.bazel
└── src
└── main.rs
load("@rules_rust//rust:defs.bzl", "rust_binary")
package(default_visibility = ["//visibility:public"])
rust_binary(
name = "foo",
srcs = ["src/main.rs"],
)
bazel run //:foo
INFO: Invocation ID: 0b6345d8-3512-450b-8ffb-ac3504f3aefc
ERROR: /home/bb/.cache/bazel/_bazel_bb/60385f905182673b726e25229e70b273/external/rules_rust/util/process_wrapper/BUILD.bazel:55:14: in _native_binary rule @rules_rust//util/process_wrapper:bootstrap_process_wrapper:
Traceback (most recent call last):
File "/home/bb/.cache/bazel/_bazel_bb/60385f905182673b726e25229e70b273/external/bazel_skylib/rules/native_binary.bzl", line 42, column 22, in _impl
return _impl_rule(ctx, ctx.attr.is_windows)
File "/home/bb/.cache/bazel/_bazel_b/60385f905182673b726e25229e70b273/external/bazel_skylib/rules/native_binary.bzl", line 33, column 23, in _impl_rule
files = depset(items = [out]),
Error in depset: depset() got unexpected keyword argument 'items'
ERROR: /home/bb/.cache/bazel/_bazel_bb/60385f905182673b726e25229e70b273/external/rules_rust/util/process_wrapper/BUILD.bazel:55:14: Analysis of target '@rules_rust//util/process_wrapper:bootstrap_process_wrapper' failed
ERROR: Analysis of target '//:foo' failed; build aborted:
INFO: Elapsed time: 0.236s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 1 target configured)
FAILED: Build did NOT complete successfully (1 packages loaded, 1 target configured)
I'm not sure how you're getting this. I don't see those lines of code in https://github.com/bazelbuild/bazel-skylib/blob/1.3.0/rules/native_binary.bzl. Somehow you're getting an older rev but I don't see in rules_rust where we'd be pinning back that far https://github.com/bazelbuild/bazel-skylib/blob/1.0.2/rules/native_binary.bzl#L33
Are you sure this is the entire WORKSPACE?
No, it's not the whole WORKSPACE, just the parts related to the rust rules. This is in a large mono-repo with ~800 LOC in the workspace file.
I'm sorry, I'm not super familiar with bazel. Is there something in the workspace file that I should be looking for that would cause this?
WORKSPACE:
Output:
Tested on version 0.33, 0.32, and 0.31