Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native exe classifier artifacts are not resolvable when using MODULE.bazel #1121

Open
ed-irl opened this issue Apr 30, 2024 · 0 comments
Open

Comments

@ed-irl
Copy link

ed-irl commented Apr 30, 2024

I am unable to fetch/build native dependencies using MODULE.bazel:

➜  missing_exe_repro bazel build '@maven//:io_grpc_protoc_gen_grpc_java_osx_aarch_64'
INFO: Analyzed target @@rules_jvm_external~~maven~maven//:io_grpc_protoc_gen_grpc_java_osx_aarch_64 (0 packages loaded, 2 targets configured).
ERROR: /private/var/tmp/_bazel_ekohlwey/88ee695263d2a36f7f8768dd0ebcf2dd/external/rules_jvm_external~~maven~maven/BUILD:221:6: @@rules_jvm_external~~maven~maven//:io_grpc_protoc_gen_grpc_java_osx_aarch_64: missing input file '@@rules_jvm_external~~maven~maven//:io_grpc_protoc_gen_grpc_java_exe_osx_aarch_64_1_63_0_extension'
ERROR: /private/var/tmp/_bazel_ekohlwey/88ee695263d2a36f7f8768dd0ebcf2dd/external/rules_jvm_external~~maven~maven/BUILD:221:6: 1 input file(s) do not exist
Target @@rules_jvm_external~~maven~maven//:io_grpc_protoc_gen_grpc_java_exe_osx_aarch_64_1_63_0_extension failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.282s, Critical Path: 0.02s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully

This is the MODULE.bazel I used:

bazel_dep(name = "rules_jvm_external", version = "6.1")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

GRPC_JAVA_VERSION = "1.63.0"
maven.install(
    artifacts = [
        "io.grpc:protoc-gen-grpc-java:exe:osx-x86_64:%s" % GRPC_JAVA_VERSION,
        "io.grpc:protoc-gen-grpc-java:exe:osx-aarch_64:%s" % GRPC_JAVA_VERSION,
        "io.grpc:protoc-gen-grpc-java:exe:linux-x86_64:%s" % GRPC_JAVA_VERSION,
    ],
    fetch_sources = True,
    generate_compat_repositories = True,
)
use_repo(
    maven,
    "maven"
)

I've attempted to trace through the files referenced in https://github.com/bazelbuild/rules_jvm_external/pull/908/files to understand why this might be happening. I assume it is either something related to the use of bzlmod or something regarding my usage that is wrong, but it appears that this usage is basically equivalent to what is in the tests.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant