bazel rules_kotlin visibility issues.
- Ngôn ngữ chính
- Java
- Star
- 12.1k
- Fork
- 4k
- Merge trung bình
- 2 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 37
Mô tả
### 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 ?
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với cloud/modules/grpc/svc/BUILD tại dòng 22 và tái hiện Bazel target bị lỗi //cloud/modules/grpc/svc:integration_tests. Kiểm tra classpath và khả năng hiển thị của InProcessServerBuilder cùng superclass chưa được phân giải của nó trong rules_kotlin. Công việc được xem là hoàn tất khi target kiểm thử tích hợp Kotlin biên dịch mà không có lỗi phân giải khả năng hiển thị, đồng thời giữ nguyên hành vi Java hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, kotlin
- Lĩnh vực
- build-system, testing
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100