bazelbuild / bazel-central-registry

The central registry of Bazel modules for the Bzlmod external dependency system.
https://registry.bazel.build
Apache License 2.0
251 stars 321 forks source link

[Bug]: grpc-java 1.62.2 causes "no repository visible as '@com_google_protobuf_javalite'" error #2538

Open gonzojive opened 3 months ago

gonzojive commented 3 months ago

What happened?

grpc-java 1.62.2 causes bazel mod graph to print an error instead of show the dependency graph.

Version

Development (host) and target OS/architectures: Ubuntu LTS

Output of bazel --version:

$ bazel version                                                                                                                                                                  
Bazelisk version: development                                                                                                                                                                                      
Build label: 7.2.1                                                                                                                                                                                                 
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer                                                                                                                                    
Build time: Tue Jun 25 15:53:05 2024 (1719330785)                                                                                                                                                                  
Build timestamp: 1719330785                                                                                                                                                                                        
Build timestamp as int: 1719330785

How to reproduce

MODULE.bazel:

module(
    name = "example_thing",
    version = "0.0.0",
    compatibility_level = 1,
    repo_name = "example",
)

# Needed to resolve https://github.com/grpc/grpc-java/issues/11275.
bazel_dep(name = "grpc-java", version = "1.62.2")

.bazelrc

common --enable_bzlmod
$ bazel mod graph

ERROR: 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 repository '@@grpc-java~', but referenced by label '@com_google_protobuf_javalite//:protobuf_javalite' in attribute 'target' of tag 'override'. Is the module 'grpc-java' missing a bazel_dep or use_repo(..., "com_google_protobuf_javalite")?. Type 'bazel help mod' for syntax and help.

Any other information?

No response

gonzojive commented 3 months ago

Related issue in grpc-java repo: https://github.com/grpc/grpc-java/issues/11275