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

Proto source with label @@grpc-proto~//:... should be in same package as consuming rule #11791

Open
vorburger opened this issue Dec 30, 2024 · 1 comment

Comments

@vorburger
Copy link
Contributor

What version of gRPC-Java are you using?

bazel_dep(name = "grpc-java", version = 1.69.0, repo_name = "io_grpc_grpc_java")

What did you expect to see?

No Warnings.

What did you see instead?

DEBUG: /home/vorburger/.cache/bazel/_bazel_vorburger/a3cf8df34f0c7a76e9926daaad9ffbf4/external/rules_jvm_external~/private/extensions/maven.bzl:155:14: The maven repository 'maven' is used in two different bazel modules, originally in '' and now in 'grpc-java'
DEBUG: /home/vorburger/.cache/bazel/_bazel_vorburger/a3cf8df34f0c7a76e9926daaad9ffbf4/external/grpc-java~/java_grpc_library.bzl:84:14: in srcs attribute of @@grpc-java~//grpclb:load_balancer_java_grpc: Proto source with label @@grpc-proto~//:grpclb_load_balancer_proto should be in same package as consuming rule
DEBUG: /home/vorburger/.cache/bazel/_bazel_vorburger/a3cf8df34f0c7a76e9926daaad9ffbf4/external/grpc-java~/java_grpc_library.bzl:84:14: in srcs attribute of @@grpc-java~//rls:rls_java_grpc: Proto source with label @@grpc-proto~//:rls_proto should be in same package as consuming rule
DEBUG: /home/vorburger/.cache/bazel/_bazel_vorburger/a3cf8df34f0c7a76e9926daaad9ffbf4/external/grpc-java~/java_grpc_library.bzl:84:14: in srcs attribute of @@grpc-java~//services:_reflection_v1_java_grpc: Proto source with label @@grpc-proto~//:reflection_proto should be in same package as consuming rule
DEBUG: /home/vorburger/.cache/bazel/_bazel_vorburger/a3cf8df34f0c7a76e9926daaad9ffbf4/external/grpc-java~/java_grpc_library.bzl:84:14: in srcs attribute of @@grpc-java~//xds:xds_service_orca_v3_java_grpc: Proto source with label @@xds~//xds/service/orca/v3:pkg should be in same package as consuming rule
DEBUG: /home/vorburger/.cache/bazel/_bazel_vorburger/a3cf8df34f0c7a76e9926daaad9ffbf4/external/grpc-java~/java_grpc_library.bzl:84:14: in srcs attribute of @@grpc-java~//services:_health_java_grpc: Proto source with label @@grpc-proto~//:health_proto should be in same package as consuming rule
DEBUG: /home/vorburger/.cache/bazel/_bazel_vorburger/a3cf8df34f0c7a76e9926daaad9ffbf4/external/grpc-java~/java_grpc_library.bzl:84:14: in srcs attribute of @@grpc-java~//services:_reflection_java_grpc: Proto source with label @@grpc-proto~//:reflection_proto_deprecated should be in same package as consuming rule
DEBUG: /home/vorburger/.cache/bazel/_bazel_vorburger/a3cf8df34f0c7a76e9926daaad9ffbf4/external/grpc-java~/java_grpc_library.bzl:84:14: in srcs attribute of @@grpc-java~//services:_channelz_java_grpc: Proto source with label @@grpc-proto~//:channelz_proto should be in same package as consuming rule
DEBUG: /home/vorburger/.cache/bazel/_bazel_vorburger/a3cf8df34f0c7a76e9926daaad9ffbf4/external/grpc-java~/java_grpc_library.bzl:84:14: in srcs attribute of @@grpc-java~//xds:envoy_service_status_v3_java_grpc: Proto source with label @@envoy_api~//envoy/service/status/v3:pkg should be in same package as consuming rule
DEBUG: /home/vorburger/.cache/bazel/_bazel_vorburger/a3cf8df34f0c7a76e9926daaad9ffbf4/external/grpc-java~/java_grpc_library.bzl:84:14: in srcs attribute of @@grpc-java~//xds:envoy_service_discovery_v3_java_grpc: Proto source with label @@envoy_api~//envoy/service/discovery/v3:pkg should be in same package as consuming rule
DEBUG: /home/vorburger/.cache/bazel/_bazel_vorburger/a3cf8df34f0c7a76e9926daaad9ffbf4/external/grpc-java~/java_grpc_library.bzl:84:14: in srcs attribute of @@grpc-java~//xds:envoy_service_load_stats_v3_java_grpc: Proto source with label @@envoy_api~//envoy/service/load_stats/v3:pkg should be in same package as consuming rule

I'll open a separate issue for the

Steps to reproduce the bug

TBD.

@ejona86
Copy link
Member

ejona86 commented Jan 7, 2025

Yeah, this is expected and unfortunate, to avoid grpc-proto having a circular dependency on grpc-java. The real fix is supporting aspects in java_grpc_library so the DEBUG can go away. I don't have any time to do that, but I also keep thinking it's going to get easier with time once there's tools for protoc plugins. That effort has been repeatedly slower than I expect, even with updated expectations as the years go on as I keep seeing glimpses of progress.

The messages during build have been there at least since e0477bb in 2019 (I don't know if alts/ got them first), and the DEBUG in java_grpc_library has been a thing since 2016 (before it was open-sourced). I'm most surprised you're the first to complain about it to my knowledge.

Note that this DEBUG is a completely separate discussion that we're already having in rules_jvm_external:

DEBUG: /home/vorburger/.cache/bazel/_bazel_vorburger/a3cf8df34f0c7a76e9926daaad9ffbf4/external/rules_jvm_external~/private/extensions/maven.bzl:155:14: The maven repository 'maven' is used in two different bazel modules, originally in '' and now in 'grpc-java'

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

2 participants