Assertion failed message when compiling with Scala in IntelliJ

Scala compilation (plugin version: 0.5.966) fails on IntelliJ with this.

Any idea what's up?

Information:Note: Some input files additionally use or override a deprecated API.
Information:Note: Some input files use unchecked or unsafe operations.
Information:Note: Recompile with -Xlint:unchecked for details.
Information:Note: file:/Users/g/Go/code/infinispan.git/lucene-directory/src/test/java/org/infinispan/lucene/readlocks/ConfigurationCheckTest.java uses unchecked or unsafe operations.
Information:Note: file:/Users/g/Go/code/infinispan.git/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.java uses unchecked or unsafe operations.
Information:Compilation completed with 49 errors and 274 warnings
Information:49 errors
Information:274 warnings
Error: java.lang.AssertionError: assertion failed: org.infinispan.marshall.AdvancedExternalizer
Error:at scala.Predef$.assert(Predef.scala:160)
Error:at scala.tools.nsc.symtab.Types$PolyType.<init>(Types.scala:2152)
Error:at scala.tools.nsc.symtab.Types$class.typeFun(Types.scala:2869)
Error:at scala.tools.nsc.symtab.SymbolTable.typeFun(SymbolTable.scala:13)
Error:at scala.tools.nsc.symtab.Types$class.typeFunAnon(Types.scala:2865)
Error:at scala.tools.nsc.symtab.SymbolTable.typeFunAnon(SymbolTable.scala:13)
Error:at scala.tools.nsc.symtab.Types$TypeRef.etaExpand(Types.scala:1873)
Error:at scala.tools.nsc.symtab.Types$TypeRef.normalize0(Types.scala:1883)
Error:at scala.tools.nsc.symtab.Types$TypeRef.normalize(Types.scala:1895)
Error:at scala.tools.nsc.backend.icode.TypeKinds$class.toTypeKind(TypeKinds.scala:375)
Error:at scala.tools.nsc.backend.icode.ICodes.toTypeKind(ICodes.scala:25)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:949)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genStat(GenICode.scala:174)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$genStat$1.apply(GenICode.scala:143)
Error:at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:111)
Error:at scala.collection.immutable.List.foldLeft(List.scala:76)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genStat(GenICode.scala:143)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:1052)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:114)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:69)
Error:at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
Error:at scala.collection.immutable.List.foreach(List.scala:76)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:69)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:136)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:88)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:79)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:65)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase.apply(GenICode.scala:61)
Error:at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:329)
Error:at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
Error:at scala.collection.Iterator$class.foreach(Iterator.scala:772)
Error:at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:318)
Error:at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:297)
Error:at scala.tools.nsc.backend.icode.GenICode$ICodePhase.run(GenICode.scala:54)
Error:at scala.tools.nsc.Global$Run.compileSources(Global.scala:953)
Error:at scala.tools.nsc.Global$Run.compile(Global.scala:1041)
Error:at scala.tools.nsc.Main$.process(Main.scala:106)
Error:at scala.tools.nsc.Main$.main(Main.scala:123)
Error:at scala.tools.nsc.Main.main(Main.scala)
Error:at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error:at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Error:at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Error:at java.lang.reflect.Method.invoke(Method.java:597)
Error:at org.jetbrains.plugins.scala.compiler.rt.ClassRunner.main(ClassRunner.java:46)
Error:
Error:Exception in thread "main" java.lang.reflect.InvocationTargetException
Error:Caused by: java.lang.AssertionError: assertion failed: org.infinispan.marshall.AdvancedExternalizer
Error:... 5 more

5 comments
Comment actions Permalink

Is it ok from command line or from IntelliJ with previous plugin version?

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

Works fine from command line. It worked fine with a previous Scala plugin, but looking at the scala compiler settings in the IDE, seems like the default is for: 'Scalac, Javac', and this class that it's complaining about it's a Java class.

Once I switched to 'Javac, Scalac', the compilation works fine.

0
Comment actions Permalink

Then it is probably scalac bug, you can try to check it from the command line (to have possibility to raise an issue), also changing order to scalac (don't forget to include all Java files to the command) and then javac.

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

I think I'm seeing this now. But I cannot seem to make the "Javac then Scalac" option stick. Every time I select it then reopen the dialog neither radio box is checked. And of course my project stil fails to compile.

0
Comment actions Permalink

You can try to update this option manually (this is weird that it's not working).
Open scala_compiler.xml file under .idea directory. Then paste: <option name="SCALAC_BEFORE" value="false" />

Best regards,
Alexander Podkhalyuzin.

0

Please sign in to leave a comment.