More than one Scala library when using another version than 2.12

444 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Jens Rabe

ungelesen,
16.06.2017, 09:26:5916.06.17
an Scala IDE User
When using Scala-IDE with Eclipse PDE, and set the Scala version to a different one than 2.12, I get the error "More than one scala library found in the build path".

I can go to the Manifest and manually put in there something like:
Require-Bundle: org.scala-lang.scala-library;bundle-version="[2.11.0,2.12.0)"

but then the error does not go away but becomes a warning.

Indeed I have two different jars of Scala 2.11.8 in my .p2/pool/plugins. How do I get rid of one?

wpopie...@virtuslab.com

ungelesen,
19.06.2017, 03:54:4519.06.17
an Scala IDE User
Well, this is rather related to fact that you are keeping plugin dependencies in your classpath. In .classpath it looks like:
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
I'm not an expert but this guy is computed by Eclipse so I there is no rather easy way to solve it. Generally when you write new plugin you get it on your path and if you need to use scala 2.11.8 probably you need to use 2.11.8 Scala IDE (like 4.5.0) for it. There is also another way to handle this sort of problem. Currently I'm working on Lagom plugin and Lagom itself is scala 2.11, so in my case the core plugin code is in 2.12 but I have some code which is written as separate projects in 2.11 and I just add them to bundle.

Jens Rabe

ungelesen,
23.06.2017, 03:48:2523.06.17
an Scala IDE User
I thought something like this. Some of my code has to be run on Spark and Hadoop, and Spark is currently still on 2.11, and on some distributions (like Hortonworks HDP) it is even on 2.10. So my SBT project is usind 2.11 with crossbuild to 2.10. Luckily, it's also possible to use a 2.11 Scala IDE on 4.6, the update site URL for Scala-IDE can be changed so it says 211 instead of 212 and it'll pull in fairly recent plugins built for 2.11. So, for the time being, I use an older version of Scala IDE for 2.11.

Plus, using RCP with Scala IDE doesn't really seem to be supported, I asked about this some time ago and I was advised to build my GUI with web technologies instead. This is not feasible for me as it would mean I have to reinvent a lot of wheels that are already present on RCP and the Eclipse workbench.
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten