You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feels like a pretty obscure corner case, but in the following situation:
A Bazel package with mixed Java and Kotlin sources, where the Java code references the Kotlin code, and
A java-based (not sure if that's a necessary condition) plugin that doesn't generate any source code (not sure if that's a necessary condition).
Then the Compiling Java headers (building the -java-hjar.jar file) fails to compile the Java code with an error like error: could not resolve <AnyClassDefinedInKotlin>.
I think the issue is in how the dependencies for the Java stubs compilation is set up here and here. In the second case, the .abi.jar, which contains class file definitions from Kotlin, is added, and the build works. In my case, I seem to be hitting the first situation, and the build doesn't work because the ABI jar is missing from the classpath (instead, there is a kapt-generated-stub.jar file at the corresponding place in the classpath). I don't understand that code well enough to actually propose a solution.
The reason I ran into this is that I'm doing a blanket add of a Dagger SPI plugin across a wide range of builds when a given flag is enabled. SPI plugins get loaded by Dagger only when Dagger runs so I thought it it should be a no-op for packages where Dagger isn't used. But that's not the case, it actually breaks building as described above.
The text was updated successfully, but these errors were encountered:
This feels like a pretty obscure corner case, but in the following situation:
Then the
Compiling Java headers
(building the-java-hjar.jar
file) fails to compile the Java code with an error likeerror: could not resolve <AnyClassDefinedInKotlin>
.I think the issue is in how the dependencies for the Java stubs compilation is set up here and here. In the second case, the
.abi.jar
, which contains class file definitions from Kotlin, is added, and the build works. In my case, I seem to be hitting the first situation, and the build doesn't work because the ABI jar is missing from the classpath (instead, there is akapt-generated-stub.jar
file at the corresponding place in the classpath). I don't understand that code well enough to actually propose a solution.The reason I ran into this is that I'm doing a blanket add of a Dagger SPI plugin across a wide range of builds when a given flag is enabled. SPI plugins get loaded by Dagger only when Dagger runs so I thought it it should be a no-op for packages where Dagger isn't used. But that's not the case, it actually breaks building as described above.
The text was updated successfully, but these errors were encountered: