grpc / grpc/grpc-java

bazel rules_kotlin visibility issues.

オープン
#4,258 コメント 10 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
12.1k
フォーク
4k
平均マージ
2日 17時間
マージ済み PR(30日)
37

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, kotlin
領域
build-system, testing
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。