grpc / grpc/grpc-java

bazel rules_kotlin visibility issues.

Abierto
#4,258 10 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
12.1k
Forks
4k
Merge medio
2 d 17 h
PR fusionados (30 d)
37

Descripción

### 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 ?

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start with cloud/modules/grpc/svc/BUILD at line 22 and reproduce the failing //cloud/modules/grpc/svc:integration_tests Bazel target. Inspect the rules_kotlin classpath and visibility for InProcessServerBuilder and its unresolved superclass. Done means the Kotlin integration test target compiles without visibility-resolution errors while preserving the existing Java behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java, kotlin
Área
build-system, testing
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.