-
I am attempting to use the helloworld sample from the v20241115 tag with Intellij. The java source files are It seems the I added the following to
However, I am running into a rather cryptic error. (See screenshot 2) Error:ANALYSIS_FAILURE: //src/main/java/com/google/j2cl/samples/helloworldlib:HelloWorld |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
I’ve had exactly the same experience — I’ve tried various combinations of IntelliJ IDEA and the Bazel plugin, but the result is pretty much the same. Sometimes, IDEA completely freezes when opening the project. Since I use j2cl with maven, it’s not a major issue for me. I wonder if anyone actually has a working setup of IDEA with the Bazel plugin? |
Beta Was this translation helpful? Give feedback.
-
I haven't tried Intellij with J2CL but if you are trying to workaround Bazel plugin issue by adding a Taking a quick look at https://github.com/bazelbuild/intellij, they are aspecting Bazel providers like |
Beta Was this translation helpful? Give feedback.
-
Using the non-j2cl deps worked for me: |
Beta Was this translation helpful? Give feedback.
I haven't tried Intellij with J2CL but if you are trying to workaround Bazel plugin issue by adding a
java_library
you need to make sure the dependencies are also converted tojava_library
dependencies. In your example@com_google_j2cl//:jsinterop-annotations-j2cl
would need to be replaced with@com_google_j2cl//:jsinterop-annotations
.Taking a quick look at https://github.com/bazelbuild/intellij, they are aspecting Bazel providers like
JavaInfo
. That should be ultimately updated to handleJ2clInfo
provider to support J2CL. https://github.com/bazelbuild/intellij/blob/df5f04bc4e412fb6a938af826f9c86a0c4a4591d/aspect/intellij_info_impl.bzl looks like the main part collecting information for …