Compiling molecule project with scalac2.12.0-M2

142 views
Skip to first unread message

Koen Daenen

unread,
Sep 16, 2015, 9:31:16 AM9/16/15
to scala-internals
The molecule project (https://github.com/molecule-labs/molecule) compiles with scalac 2.9.3, 2.10.5 and 2.11.7.
The project has a benchmark built-in. It is full of lambda expressions, so I like to see the result of running it on JVM1.8 with the latest scalac 2.12.0-M2
The package molecule-core has no other dependencies than just the standard scala and Java classes, so I started with that,
but the compiler crashed.

Is it to soon in 2.12 roadmap for this kind of tests, or will somebody look into it and fix it in M3 so I can run my benchmark before RC1?
 
Thanks
Koen

Jason Zaugg

unread,
Sep 16, 2015, 9:45:51 AM9/16/15
to scala-internals
Bug reports are very, very welcome!

-jason


--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Koen Daenen

unread,
Sep 17, 2015, 6:49:38 AM9/17/15
to scala-internals
This is what I got

[error] 
[error]   EmptyScope.enter
[error]      while compiling: /Users/daenenk/Workspaces/github/molecule/molecule-core/src/main/scala/molecule/process/CoreProcess.scala
[error]         during phase: globalPhase=lambdalift, enteringPhase=constructors
[error]      library version: version 2.12.0-M2
[error]     compiler version: version 2.12.0-M2
[error]   reconstructed args: -classpath /Users/daenenk/Workspaces/github/molecule/molecule-core/target/jvm-1.8/scala-2.12.0-M2/classes -bootclasspath /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/classes:/Users/daenenk/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.0-M2.jar
[error] 
[error]   last tree to typer: TypeTree(class Either)
[error]        tree position: line 478 of /Users/daenenk/Workspaces/github/molecule/molecule-core/src/main/scala/molecule/channel/RChan.scala
[error]             tree tpe: scala.util.Either
[error]               symbol: (sealed abstract) class Either in package util
[error]    symbol definition: sealed abstract class Either extends Product with Serializable (a ClassSymbol)
[error]       symbol package: scala.util
[error]        symbol owners: class Either
[error]            call site: method main in package process
[error] 
[error] == Source file context for tree position ==
[error] 
[error]    475     }
[error]    476 
[error]    477     tmp.fold(signal => Signal.throwException(signal), identity)
[error]    478   }
[error]    479 }
[error]    480 
[error]    481 /**
exception when typing $anon$1.this.<none>
exception when typing $anon$1.this.<none>()
[trace] Stack trace suppressed: run last molecule-core/compile:compileIncremental for the full output.
[error] (molecule-core/compile:compileIncremental) scala.reflect.internal.FatalError: 
[error]   EmptyScope.enter
[error]      while compiling: /Users/daenenk/Workspaces/github/molecule/molecule-core/src/main/scala/molecule/process/CoreProcess.scala
[error]         during phase: globalPhase=lambdalift, enteringPhase=constructors
[error]      library version: version 2.12.0-M2
[error]     compiler version: version 2.12.0-M2
[error]   reconstructed args: -classpath /Users/daenenk/Workspaces/github/molecule/molecule-core/target/jvm-1.8/scala-2.12.0-M2/classes -bootclasspath /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/classes:/Users/daenenk/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.0-M2.jar
[error] 
[error]   last tree to typer: TypeTree(class Either)
[error]        tree position: line 478 of /Users/daenenk/Workspaces/github/molecule/molecule-core/src/main/scala/molecule/channel/RChan.scala
[error]             tree tpe: scala.util.Either
[error]               symbol: (sealed abstract) class Either in package util
[error]    symbol definition: sealed abstract class Either extends Product with Serializable (a ClassSymbol)
[error]       symbol package: scala.util
[error]        symbol owners: class Either
[error]            call site: method main in package process
[error] 
[error] == Source file context for tree position ==
[error] 
[error]    475     }
[error]    476 
[error]    477     tmp.fold(signal => Signal.throwException(signal), identity)
[error]    478   }
[error]    479 }
[error]    480 
[error]    481 /**
[error] Total time: 10 s, completed Sep 17, 2015 12:46:05 PM

Jason Zaugg

unread,
Sep 17, 2015, 7:28:14 AM9/17/15
to scala-internals
Could you please publish a branch + instructions that I could use to reproduce the error? I didn't manage to do so with the master.

Thanks,

-jason

--

som-snytt

unread,
Sep 17, 2015, 4:52:25 PM9/17/15
to scala-internals

I also cloned it but didn't see a branch for 2.12. I'm happy to try something brainlessly, but ask me to modify build.sbt and I go back to my day job.


On Thursday, September 17, 2015 at 4:28:14 AM UTC-7, Jason Zaugg wrote:
Could you please publish a branch + instructions that I could use to reproduce the error? I didn't manage to do so with the master.

Thanks,

-jason

Koen Daenen

unread,
Sep 18, 2015, 5:20:00 AM9/18/15
to scala-internals
Thx for responding and sorry I didn't put it all up right on github from the start, which I did now.

Please checkout the branch 'develop'.
launch sbt with a jvm1.8
select the project molecule-core
compile

This should result in the error I posted before.

This is a build definition with multiple projects. As mentioned earlier, let's start with molecule-core as it has no other dependencies and all other projects depends on this one. 

Jason Zaugg

unread,
Sep 18, 2015, 8:28:39 AM9/18/15
to scala-internals
Looks like the problem is with typechecking references to overloaded, inherited members of an enclosing package object, and most likely regressed in my commit https://github.com/scala/scala/commit/51745c06f318f859b313c8257a41221837671ac1

I believe that this patch works around the issue in your code base:


Tracking as https://issues.scala-lang.org/browse/SI-9479. We'll fix this in 2.12.0-M3.

-jason


--

Koen Daenen

unread,
Sep 18, 2015, 9:38:53 AM9/18/15
to scala-internals
Thx for the workaround. I now can compile molecule-core, molecule-io, molecule-parsers and molecule-net.
Reply all
Reply to author
Forward
0 new messages