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
load("@bazel_gazelle//:def.bzl", "DEFAULT_LANGUAGES", "gazelle", "gazelle_binary")
# gazelle:prefix github.com/your/project
gazelle(
name = "gazelle",
gazelle = ":gazelle_bin",
)
gazelle_binary(
name = "gazelle_bin",
languages = DEFAULT_LANGUAGES + [
"@contrib_rules_jvm//java/gazelle",
],
)
But I get the following error every time trying to build the gazelle bin:
bazel build --java_runtime_version=remotejdk_11 //:gazelle_bin
INFO: Build options --java_runtime_version and --platforms have changed, discarding analysis cache.
INFO: Analyzed target //:gazelle_bin (26 packages loaded, 11751 targets configured).
INFO: Found 1 target...
ERROR: /home/ali/.cache/bazel/_bazel_ali/4a1126a8538496440d4036a94732d2f6/external/org_golang_google_grpc/internal/channelz/BUILD.bazel:3:11: GoCompilePkg external/org_golang_google_grpc/internal/channelz/channelz.a failed: (Exit 1): builder failed: error executing command bazel-out/k8-opt-exec-2B5CBBC6/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix linux_amd64 -src external/org_golang_google_grpc/internal/channelz/funcs.go -src ... (remaining 35 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
compilepkg: missing strict dependencies:
/home/ali/.cache/bazel/_bazel_ali/4a1126a8538496440d4036a94732d2f6/sandbox/linux-sandbox/671/execroot/__main__/external/org_golang_google_grpc/internal/channelz/types_linux.go: import of "golang.org/x/sys/unix"
No dependencies were provided.
Check that imports in Go sources match importpath attributes in deps.
Target //:gazelle_bin failed to build
Use --verbose_failures to see the command lines of failed build steps.
The text was updated successfully, but these errors were encountered:
I'm on 1.18 and also ran into missing strict dependencies issues, albeit a different one. I think the easiest solution is to add those dependencies explicitly as go_repository's. See issue here: bazelbuild/bazel-gazelle#1217 (comment)
Hello I tried building the Gazelle java extension on Ubuntu 22.04 using the following:
WORKSPACE:
BUILD:
But I get the following error every time trying to build the gazelle bin:
The text was updated successfully, but these errors were encountered: