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
Support for Scala 2.12 #380
Comments
I attempted to do this and it basically involved updating a bunch of dependencies for the parsing and json infrastructure, and then three changes to marginal to remove a type it couldn't infer. Scala 2.12 does give a lot of warnings when compiling the current codebase, and the scalatest versions don't seem to be compatible. It's not too much work to do though. |
Hi @Craigacp ! Any chance you could look into this issue please ? |
It's a fairly straightforward change, but I don't understand the Marginal class so I'm not sure if the changes I tried are actually correct. One of the UMass people would need to work on it. |
Java 9 only runs with Scala 2.12 and up (I tested 2.12.3, and the release of 2.12.0 I had before didn't work) so this is becoming more important. In addition to minor code changes, I think a bunch of the maven plugins need updated version numbers too, as older versions of Maven have issues with Java 9. |
I have forked factorie and created a cut down version for nlp use (removed command line, mongodb, and docs etcs), and also removed the custom build and replaced it with a standard SBT build. Too far away from this code base to offer as a pull request, but working for nlp with 2.12.3 nevertheless. |
Sorry for the delay. I made a branch that compiles under Scala 2.12.4, when I build with either the latest Maven or IntelliJ. But... it needs Java 8 (I just set my JAVA_HOME before running Maven to get things running quick. https://github.com/factorie/factorie/tree/scala-2.12 Java 9 seems to have trouble compiling with the scala-maven-plugin, and I tried all kinds of versions of the plugin but still ran into the same NPE. Adam, if you got it working before maybe you could take a peek at this branch and see if you can make it build with Java 9? |
Scala 2.12 requires Java 8, as it rewrites Scala's lambdas to use the new JVM support. @lvilnis Turning off incremental compilation makes it compile fine under Java 9. It looks like zinc generates something weird when it tries to inspect the classpath (which has changed with the introduction of modules in Java 9). It might be due to the zinc interop code in scala-maven-plugin being quite old, looks like it hasn't been touched in years. The pom file diff is:
|
Thank you! That was killing me yesterday. I'll ask around but I think having incremental compilation turned off in maven by default works for me (I use my IDE for incremental compilation, and maven I always do clean compiles to make packages and stuff). @strubell do you have thoughts on switching this to default no incremental comp for maven? |
I actually don't think incremental compilation was/is even working for
quite a long time, so it shouldn't be a problem.
…On Fri, Nov 17, 2017 at 5:27 PM Luke Vilnis ***@***.***> wrote:
Thank you! That was killing me yesterday.
I'll ask around but I think having incremental compilation turned off in
maven by default works for me (I use my IDE for incremental compilation,
and maven I always do clean compiles to make packages and stuff).
@strubell <https://github.com/strubell> do you have thoughts on switching
this to default no incremental comp for maven?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#380 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADHZtypzj7f-lq9xhIsrKDhroCB5Acdfks5s3ghjgaJpZM4MQ3Hk>
.
|
OK I'm gonna turn it off then. |
So... I should probably merge this and get going with a release soon. |
@lvilnis Hi Luke! Any progress with this ticket? Could you push new build to maven repo please ? |
Also I can't compile master for 2.12.4 using cross-buildin
Any ideas what causes it ? I see following warning as well. Maybe related ?
I was able to build after changing scala version in Build.scala but there are more missing dependencies. For example
Switching to
which was fixed by adding
to dependencies. |
Guys, I published builds of master branch for 2.11 and 2.12 if somebody needs them. Add @lvilnis Overall build script needs some cleaning for cross-builds to work. |
Hi,
I was wondering if you are planning to officially support Scala 2.12?
Scala 2.12 is out for quite some time now and a lot major libraries support it.
Any comment on this would be highly appreciated!
The text was updated successfully, but these errors were encountered: