bazel rules_kotlin visibility issues.
- Dominant language
- Java
- Stars
- 12.1k
- Forks
- 4k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Description
### What version of gRPC are you using?
Bazel:
```
com_google_protobuf_commit = "106ffc04be1abf3ff3399f54ccf149815b287dd9",
grpc_java_commit = "0a6fd9bd9c192551f1056b751750bc6e718bd20c", # 1.10.0 release.
_grpc_java_repositories(
omit_com_google_truth_truth=True,
omit_com_google_protobuf=True,
omit_junit_junit=True,
omit_com_google_code_gson=True,
omit_com_google_guava=True,
omit_com_squareup_okio=True,
omit_io_opencensus_api=True,
omit_io_opencensus_grpc_metrics=True,
omit_io_netty_tcnative_boringssl_static=True,
omit_com_google_code_findbugs_jsr305=True,
omit_com_google_errorprone_error_prone_annotations=True
)
```
```
ERROR: /Users/hassan/newcode/src/github.com/axsy-dev/server-cloud/cloud/modules/grpc/svc/BUILD:22:1: Compiling 2 Kotlin source files to cloud/modules/grpc/svc/integration_tests.jar failed (Exit 1): builder failed: error executing command
(cd /private/var/tmp/_bazel_hassan/0069fedf3f99ce5fa0fd408aceaeb1f0/execroot/__main__ && \
exec env - \
bazel-out/host/bin/external/io_bazel_rules_kotlin/kotlin/builder/builder @bazel-out/darwin-fastbuild/bin/cloud/modules/grpc/svc/integration_tests.jar-2.params)
error: supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class io.grpc.inprocess.InProcessServerBuilder, unresolved supertypes: io.grpc.internal.AbstractServerImplBuilder
Target //cloud/modules/grpc/svc:integration_tests failed to build
```
### What did you expect to see?
Visibility resolution not causing a problem.
### Problem
I am the maintainer of the Kotlin Bazel rules and I am working on porting some of our Grpc stuff to Kotlin. The visibility of the internal targets is causing the Kotlin compiler problems. I have only hit this problem in Kotlin. The Java rules don't have this problem. The only symbol I am using is the InProcessServerBuilder in my test class.
The Kotlin compiler is probably being too eager. I hope there is a work short term work around.
If there isn't a quick fix would it be possible to open up the visibility ?
Contributor guide
Assessment
This issue has not been assessed yet.