bazel rules_kotlin visibility issues.
- Langage dominant
- Java
- Étoiles
- 12.1k
- Forks
- 4k
- Merge moyen
- 2 j 17 h
- PR mergées (30 j)
- 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 ?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par cloud/modules/grpc/svc/BUILD à la ligne 22 et reproduisez la cible Bazel défaillante //cloud/modules/grpc/svc:integration_tests. Inspectez le classpath et la visibilité de InProcessServerBuilder ainsi que de sa superclasse non résolue dans rules_kotlin. Le travail est terminé lorsque la cible de test d’intégration Kotlin se compile sans erreurs de résolution de visibilité tout en préservant le comportement Java existant.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, kotlin
- Domaine
- build-system, testing
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100