Closed moglideveloper closed 3 years ago
The library sbt: org.scala-lang:scala-library:2.13.2:jar
must not contain all those jars from $USER_HOME$/.samplePluginIC/sdk/LATEST-EAP-SNAPSHOT
I'm able to reproduce the misconfigured library classpath, but the compilation still works in my case perhaps due to a different classpath ordering.
As a quick workaround you can manually remove those bogus classpath entries while I'm working on a fix
Thanks @mutcianm for work-around.
I tried removing suggested bogus entries, but now I am getting below error :-
scalac: No 'scala3-compiler*.jar' in Scala compiler classpath in Scala SDK sbt: org.scala-lang:scala-library:2.13.2:jar
Is there any other workaround. I can run plugin from sbt, but then I will not be able to debug sample intellij plugin, as sbt -jvm-debug 5005
is also doesn't seem to be working.
Please try updating to the latest version - 3.12.1
updating to latest version fixed problem. Thanks for quick fix.
Try to open attached simplified intellij plugin in intellij that depends on sbt-idea-plugin.
It will download and load multiple scala-library* configuration in .idea directory from below locations :- ~/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/ ~/.samplePluginIC/sdk/LATEST-EAP-SNAPSHOT/plugins/Scala/lib/
This is tried on a clean machine with just open-jdk 11 and the itellij community edition(with scala plugin) installed.
Below are the entries of scala-library inside SamplePlugin/.idea directory :-
Above configuration results in
scalac: Multiple 'scala-library*.jar' files (scala-library-2.13.2.jar, scala-library.jar, scala-library-2.13.2.jar) in Scala compiler classpath in Scala SDK sbt: org.scala-lang:scala-library:2.13.2:jar
Below is a simplified example to reproduce this problem :- https://github.com/moglideveloper/SamplePlugin