You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rules_rust is broken with Bazel@HEAD on Bazel CI #1938
I could not reproduce this with neither currently released Bazel or with the one built at head. I fixed one bug internally earlier related to CopyBara transformation, which was causing the same failure so I am assuming this version of Bazel was built at a bad change.
Traceback (most recent call last):
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/084f02f8944fe1c067dd3922f4639434/external/rules_rust~override/rust/private/rust.bzl", line 338, column 32, in _rust_binary_impl
return rustc_compile_action(
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/084f02f8944fe1c067dd3922f4639434/external/rules_rust~override/rust/private/rustc.bzl", line 1075, column 52, in rustc_compile_action
dep_info, build_info, linkstamps = collect_deps(
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/084f02f8944fe1c067dd3922f4639434/external/rules_rust~override/rust/private/rustc.bzl", line 232, column 65, in collect_deps
linkstamps.append(cc_info.linking_context.linkstamps())
Error in linkstamps: Rule in 'rust/private' cannot use private API
in last night's downstream build.
Note that, this is failing with Bzlmod enabled, where the canonical name of rules_rust changed to rules_rust~override, I guess this is why the allowlist doesn't work? Is it possible to match rules_rust* instead?
Activity
scentini commentedon Apr 25, 2023
@meteorcloudy I don't quite understand the culprit commit, but if it's of any help,
rules_rustis exempted from the private API checks here https://github.com/bazelbuild/bazel/blob/3e140f374580f0f0eb5416872e9e421126920222/src/main/java/com/google/devtools/build/lib/rules/cpp/CcModule.java#L150. This does seem like something that needs to be fixed on the Bazel side, so I will not do further investigation.sgowroji commentedon Apr 25, 2023
Please ignore the above commit added in culprit. Edited and removed now. Thanks!
scentini commentedon Apr 25, 2023
Thanks @sgowroji !
In that case, @buildbreaker2021, @oquenchil , could one of you PTAL?
buildbreaker2021 commentedon Apr 25, 2023
I will take a look
buildbreaker2021 commentedon Apr 25, 2023
I could not reproduce this with neither currently released Bazel or with the one built at head. I fixed one bug internally earlier related to CopyBara transformation, which was causing the same failure so I am assuming this version of Bazel was built at a bad change.
meteorcloudy commentedon Apr 26, 2023
@buildbreaker2021
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/2982#0187bbbc-a5b6-4b00-b654-1987518b944b
still seeing the failure
in last night's downstream build.
Note that, this is failing with Bzlmod enabled, where the canonical name of rules_rust changed to
rules_rust~override, I guess this is why the allowlist doesn't work? Is it possible to matchrules_rust*instead?meteorcloudy commentedon Apr 26, 2023
From the code, it looks like it cannot match a pattern, however, is it possible to pass repo-mapping when creating the label from the allowlist here:
https://cs.opensource.google/bazel/bazel/+/master:src/main/java/com/google/devtools/build/lib/rules/cpp/CcModule.java;l=2039
/cc @Wyverald
meteorcloudy commentedon Apr 26, 2023
Repo mapping is available at https://cs.opensource.google/bazel/bazel/+/refs/heads/master:src/main/java/com/google/devtools/build/lib/cmdline/BazelModuleContext.java;l=39
buildbreaker2021 commentedon Apr 26, 2023
Will take another look.
I missed this thanks!
buildbreaker2021 commentedon Apr 26, 2023
Should be fixed by bazelbuild/bazel@c06fe5c
meteorcloudy commentedon Apr 27, 2023
This failure has been fixed in https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/2983, but there are other failures with rules_rust, @sgowroji can you help file an new issue to track that breakage?
Rename crates_vendor_manifests to cvm to shorten windows path lengths (…