Skip to content

bazel diff failing when running via bazelisk #285

@andre-dialpad

Description

@andre-dialpad

When running bazel-diff with bazelisk I'm getting the following error:

Output

(bash)$ bazelisk run @bazel-diff//cli:bazel-diff -- generate-hashes -tt SourceFile -w ${PWD}
Starting local Bazel server (8.1.1) and connecting to it...
INFO: Invocation ID: 1e1893e2-8708-4808-8768-e4f9297d5ee3
ERROR: Analysis of target '@@bazel-diff+//cli:bazel-diff' failed; build aborted: in tag at https://bcr.bazel.build/modules/grpc-java/1.62.2/MODULE.bazel:89:15: no repository visible as '@com_google_protobuf_javalite' to the module 'grpc-java@1.62.2', but referenced by label '@com_google_protobuf_javalite//:protobuf_javalite' in attribute 'target' of tag 'override'.
INFO: Elapsed time: 8.421s, Critical Path: 0.02s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target
FAILED: 
    Fetching repository @@rules_cc++cc_configure_extension+local_config_cc; starting
    Fetching repository @@rules_java++toolchains+remote_java_tools; starting
    Fetching repository @@rules_kotlin++rules_kotlin_extensions+com_github_jetbrains_kotlin_git; starting
    Fetching /home/andrefsp/.cache/bazel/go-core/base/external/rules_java++toolchains+remote_java_tools; Extracting java_tools-v13.18.zip
    Fetching /home/andrefsp/.cache/bazel/go-core/base/external/rules_kotlin++rules_kotlin_extensions+com_github_jetbrains_kotlin_git; Extracting kotlin-compiler-2.1.0.zip
    Fetching repository @@rules_java++toolchains+remotejdk11_linux; starting
    Fetching repository @@rules_python++python+python_3_11_x86_64-unknown-linux-gnu; starting
    Fetching repository @@rules_kotlin++rules_kotlin_extensions+com_github_google_ksp; starting ... (10 fetches)

This error seems to only happen when installing bazel-diff via MODULE.bazel:

# MODULE.bazel
bazel_dep(name = "bazel-diff", version = "9.0.3")

VERSIONS:

(bash)$ java --version 
openjdk 21.0.8 2025-07-15
OpenJDK Runtime Environment (build 21.0.8+9-Ubuntu-0ubuntu124.04.1)
OpenJDK 64-Bit Server VM (build 21.0.8+9-Ubuntu-0ubuntu124.04.1, mixed mode, sharing)

(bash)$ javac --version 
javac 21.0.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions