Closed rikvdkleij closed 5 years ago
I have tried to get it working by excluding jars like in IntelliJ-Scala project but without success.
ideaMainJars := ideaMainJars.value.filterNot(file => excludeJarsFromPlatformDependencies(file.data)),
val excludeJarsFromPlatformDependencies: File => Boolean = { file =>
(file.getName.contains("openapi") || file.getName.contains("javac2") || file.getName.contains("java-api")) // version conflict with bsp4j in ultimate platformt
The reason behind this issue is not package name conflict(multiple jars may share the same package safely)
This error occurs because classes you're using in StackCommandLine.scala
are part of Java plugin implementation, which has been extracted into a separate entity in IDEA 192.X
The solution would be to add Java plugin as an internal plugin dependency in build:
ideaInternalPlugins += "java"
Also don't forget to add dependency in plugin.xml
:
<depends>com.intellij.modules.java</depends>
SDK jars contains libraries with package names which are conflicting.
The IntelliJ-Haskell plugin uses the
CompileContextImpl
of packagecom.intellij.compiler.impl
.sbt compile
gives this error:That is because also library
javac2.jar
exports packagecom.intellij.compiler
. It should use libraryjava-impl.jar
How to prevent this compile error? Is it possible to exclude
javac2.jar
?Also this error:
Btw, in the past this wasn't issue.
Compiling the plugin in IntelliJ gives no errors.
Using version
2.4.1
ofsbt-idea-plugin
and IntelliJ version192.6603.28