JetBrains / intellij-platform-gradle-plugin

Gradle plugin for building plugins for IntelliJ-based IDEs
https://plugins.jetbrains.com/docs/intellij/gradle-prerequisites.html
Apache License 2.0
1.42k stars 271 forks source link

Plugin 'Go' requires plugin 'org.intellij.intelliLang' to be installed #1056

Open rli opened 2 years ago

rli commented 2 years ago

Describe the bug

    [   1043]   WARN - #c.i.i.p.PluginManager - Problems found loading plugins:
      The Go (id=org.jetbrains.plugins.go, path=/codebuild/output/src408993822/src/github.com/aws/aws-toolkit-jetbrains/jetbrains-ultimate/build/idea-sandbox/plugins-test/go, version=222.3345.16) plugin Plugin 'Go' requires plugin 'org.intellij.intelliLang' to be installed

To Reproduce

IU 222.3345-EAP-CANDIDATE-SNAPSHOT
org.jetbrains.plugins.go:222.3345.16

Expected behavior Automatically pull in transitive dependency

Environment:

hsz commented 2 years ago

With the following setup, I can't reproduce it:

image
platformType = IU
platformVersion = 222-EAP-SNAPSHOT
platformPlugins = org.jetbrains.plugins.go:222.3345.16
Undin commented 2 years ago

@hsz I've faced with this problem as well in EduTools plugin

The essential thing here for reproducing is to run tests where Go plugin should be used. To reproduce, you can use this branch and run tests in Edu-Go module. To ensure that everything works if you add org.intellij.intelliLang dependency manually, just revert the latest commit in the branch

I suppose this bug appeared because recently org.intellij.intelliLang dependency was added via plugin model v2 syntax but previously v1 syntax was used

hsz commented 2 years ago

Then it sounds familiar to #1048, isn't it?

rli commented 2 years ago

go:212.4746.92 also uses model v2 syntax, but org.intellij.intelliLang is new in 222.3345.16, so that is probably the diff here

I don't think this is quite the same as 1048 since the classes are being resolved correctly, but since the plugin is diabled, the service loader isn't returning anything?

[    755]   WARN - #c.i.i.p.PluginManager - Problems found loading plugins:
  The Go (id=org.jetbrains.plugins.go, path=~/idetools/aws-toolkit-jetbrains/jetbrains-ultimate/build/idea-sandbox/plugins-test/go, version=222.3345.16) plugin Plugin 'Go' requires plugin 'org.intellij.intelliLang' to be installed
java.lang.NullPointerException: Cannot invoke "com.goide.project.GoModuleSettings.setGoSupportEnabled(boolean)" because the return value of "com.goide.project.GoModuleSettings.getInstance(com.intellij.openapi.module.Module)" is nulljava.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "com.goide.project.GoModuleSettings.setGoSupportEnabled(boolean)" because the return value of "com.goide.project.GoModuleSettings.getInstance(com.intellij.openapi.module.Module)" is null
    at com.intellij.openapi.application.impl.LaterInvocator.invokeAndWait(LaterInvocator.java:118)
    at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:505)

Will see if I can get more details somehow