Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for Scala 2.12 #20

Closed
wants to merge 2 commits into from
Closed

Adds support for Scala 2.12 #20

wants to merge 2 commits into from

Conversation

skyluc
Copy link

@skyluc skyluc commented Jun 6, 2014

The first commit is straight forward, it just sets new version.

The second one is a bit more problematic. The change is to depend on the 'new' scala-xml bundle, instead of only using the package dependency. This is required to be able to load scalariform and multiple versions of Scala in the same OSGi container, like we want to do in Scala IDE.
If an OSGi bundle requires Scala 2.11 and the package scala.xml, and Scala 2.10 is also available, the OSGi container will decide that the bundle depends on both Scala 2.11 and 2.10, which is is impossible.
The practical problem is that this change is not compatible with building scalariform on Scala 2.10.

In Scala IDE, we solve the problem by adding a pre-step to copy the right file for the version of Scala. Unfortunately, we haven't found a better solution, mostly due to an abuse of the Maven lifecycle by Tycho (the Eclipse build maven plugin).

@daniel-trinh
Copy link
Owner

I'm not very familiar with the maven build system -- what's a good way to test these changes? I tried running mvn in the root scalariform directory, but I get this error:

org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from scalariform 0.1.5.qualifier to bundle org.scala-lang.modules.scala-xml 0.0.0.; No solution found because the problem is unsatisfiable.]

Also, it seems like the pom.xml files are still referencing 0.1.5-SNAPSHOT / org.scalariform, should those be updated to point to 0.1.5 / com.danieltrinh?

@skyluc
Copy link
Author

skyluc commented Jun 10, 2014

Oh, ok. I didn't notice that it was primarily a sbt project. Asking to the other Scala IDE devs, it appears that the pom.xml file was added to facilitate our builds.

Anyhow, the way maven is configured, a profile has to be specified when running the build. There are 3 profiles: scala-2.10.x, scala-2.11.x and scala-2.12.x.
Most of the configuration default to Scala 2.10 when no profiles are specified, but it is no more working with this PR. It is expected from the changes, and will not be a problem for Scala IDE.

The basic way to launch the build is:

mvn -Pscala-2.11.x clean verify

@skyluc
Copy link
Author

skyluc commented Jun 10, 2014

And yes, the pom.xml files need to be updated to match the sbt configuration.
I'll go through them and create a different pull request with the changes.

@skyluc
Copy link
Author

skyluc commented Jun 20, 2014

I'll recreate this PR on top of the 0.1.6-SNAPSHOT branch.

@skyluc skyluc closed this Jun 20, 2014
@skyluc skyluc mentioned this pull request Jun 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants