compiler/generator: declare kotlinx-coroutines-core JVM variant#756
Open
smolkaj wants to merge 1 commit into
Open
compiler/generator: declare kotlinx-coroutines-core JVM variant#756smolkaj wants to merge 1 commit into
smolkaj wants to merge 1 commit into
Conversation
The `generator` kt_jvm_library declares the common
`kotlinx-coroutines-core` Maven artifact, but its Kotlin source uses
symbols that live in the JVM-specific `kotlinx-coroutines-core-jvm`
artifact. Under rules_kotlin's `experimental_strict_kotlin_deps`
checker, the build fails with:
** Please add the following dependencies:
@rules_jvm_external++maven+grpc_kotlin_maven//:
org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm
to //compiler/src/main/java/io/grpc/kotlin/generator:generator
Switching to the `-jvm` variant matches where the symbols actually
resolve on the JVM classpath and unblocks strict-deps consumers.
No behavior change — the `-jvm` artifact is always what the JVM
resolves for this package.
Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
smolkaj
added a commit
to 4ward-p4/4ward
that referenced
this pull request
Apr 11, 2026
grpc/grpc-kotlin#756 covers the generator/BUILD.bazel half. The kt_jvm_grpc.bzl macro half is more opinionated and may need a separate conversation upstream before it can land. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
compiler/.../generatordeclares the commonkotlinx-coroutines-coreartifact, but the Kotlin source resolves to the JVM variant on the classpath, sorules_kotlin'sexperimental_strict_kotlin_deps = "error"fails:Switch to the
-jvmvariant. No behavior change (the JVM always resolves to this artifact for this package); the:stuband:contexttargets already declare both variants, so only:generatorneeded a fix.Downstream consumers of
grpc-kotlinthat enable strict-deps currently have to patch this locally. Fixing it upstream removes that friction.Not in this PR: a separate strict-deps issue in the
kt_jvm_grpc_librarymacro inkt_jvm_grpc.bzl(the generatedkt_jvm_librarydoesn't directly declare@grpc-java//api,kotlinx-coroutines-core-jvm, or the user'sjava_proto_library). Happy to send a follow-up — the fix is a bit more opinionated so I wanted to keep this PR trivially mergeable.