You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the following build.sbt, which depends on macrame:
name :="paradise-test"
scalaVersion :="2.11.7"
libraryDependencies ++=Seq(
"com.chrisneveu"%%"macrame"%"1.0.1",
compilerPlugin("org.scalamacros"%"paradise"%"2.1.0-M5" cross CrossVersion.full))
If I introduce a compilation error in Test or try to trigger code completion (actually I think it doesn't matter what is done as long as the PC in involved) it often (but not always) happens that the PC crashes. There are error messages shown like the following:
2015-10-23 11:20:23,673 ERROR [main] - org.scala-ide.sdt.core - org.scala-ide.sdt.core - org.scala-ide.sdt.core - 0 - Throwable during asyncExec
java.lang.AssertionError: assertion failed: module Color#17793 with TypeRef
at scala.tools.nsc.Global.assert(Global.scala:261)
at org.scalamacros.paradise.reflect.StdAttachments$class.backupCompleter(StdAttachments.scala:17)
at org.scalamacros.paradise.Plugin.backupCompleter(Plugin.scala:8)
at org.scalamacros.paradise.typechecker.Namers$Namer$class.finishSymbolMaybeExpandeeCompanion(Namers.scala:407)
at org.scalamacros.paradise.typechecker.Namers$$anon$3.finishSymbolMaybeExpandeeCompanion(Namers.scala:13)
at org.scalamacros.paradise.typechecker.Namers$Namer$class.finishSymbol(Namers.scala:199)
at org.scalamacros.paradise.typechecker.Namers$$anon$3.finishSymbol(Namers.scala:13)
at org.scalamacros.paradise.typechecker.Namers$Namer$class.dispatch$1(Namers.scala:34)
at org.scalamacros.paradise.typechecker.Namers$Namer$class.enterSym(Namers.scala:40)
at org.scalamacros.paradise.typechecker.Namers$$anon$3.enterSym(Namers.scala:13)
at org.scalamacros.paradise.typechecker.AnalyzerPlugins$MacroPlugin$.pluginsEnterSym(AnalyzerPlugins.scala:36)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$13.custom(AnalyzerPlugins.scala:429)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anonfun$2.apply(AnalyzerPlugins.scala:371)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anonfun$2.apply(AnalyzerPlugins.scala:371)
at scala.collection.immutable.List.map(List.scala:273)
at scala.tools.nsc.typechecker.AnalyzerPlugins$class.invoke(AnalyzerPlugins.scala:371)
at scala.tools.nsc.typechecker.AnalyzerPlugins$class.pluginsEnterSym(AnalyzerPlugins.scala:423)
at org.scalaide.core.internal.compiler.ScalaPresentationCompiler$$anon$1.pluginsEnterSym(ScalaPresentationCompiler.scala:76)
at scala.tools.nsc.typechecker.Namers$Namer.enterSym(Namers.scala:275)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$enterSyms$1.apply(Namers.scala:501)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$enterSyms$1.apply(Namers.scala:500)
at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
at scala.collection.immutable.List.foldLeft(List.scala:84)
at scala.tools.nsc.typechecker.Namers$Namer.enterSyms(Namers.scala:500)
at org.scalamacros.paradise.typechecker.Namers$Namer$$anonfun$finishSymbolNotExpandee$1.apply(Namers.scala:220)
at org.scalamacros.paradise.typechecker.Namers$Namer$class.savingLock$1(Namers.scala:214)
at org.scalamacros.paradise.typechecker.Namers$Namer$class.finishSymbolNotExpandee(Namers.scala:218)
at org.scalamacros.paradise.typechecker.Namers$$anon$3.finishSymbolNotExpandee(Namers.scala:13)
at org.scalamacros.paradise.typechecker.Namers$Namer$class.finishSymbol(Namers.scala:182)
at org.scalamacros.paradise.typechecker.Namers$$anon$3.finishSymbol(Namers.scala:13)
at org.scalamacros.paradise.typechecker.Namers$Namer$class.dispatch$1(Namers.scala:34)
at org.scalamacros.paradise.typechecker.Namers$Namer$class.enterSym(Namers.scala:40)
at org.scalamacros.paradise.typechecker.Namers$$anon$3.enterSym(Namers.scala:13)
at org.scalamacros.paradise.typechecker.AnalyzerPlugins$MacroPlugin$.pluginsEnterSym(AnalyzerPlugins.scala:36)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$13.custom(AnalyzerPlugins.scala:429)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anonfun$2.apply(AnalyzerPlugins.scala:371)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anonfun$2.apply(AnalyzerPlugins.scala:371)
at scala.collection.immutable.List.map(List.scala:273)
at scala.tools.nsc.typechecker.AnalyzerPlugins$class.invoke(AnalyzerPlugins.scala:371)
at scala.tools.nsc.typechecker.AnalyzerPlugins$class.pluginsEnterSym(AnalyzerPlugins.scala:423)
at org.scalaide.core.internal.compiler.ScalaPresentationCompiler$$anon$1.pluginsEnterSym(ScalaPresentationCompiler.scala:76)
at scala.tools.nsc.typechecker.Namers$Namer.enterSym(Namers.scala:275)
at scala.tools.nsc.typechecker.Analyzer$namerFactory$$anon$1.apply(Analyzer.scala:43)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:440)
at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:431)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:440)
at scala.tools.nsc.Global$Run$$anonfun$compileLate$2$$anonfun$apply$1.apply(Global.scala:1609)
at scala.tools.nsc.Global$Run$$anonfun$compileLate$2$$anonfun$apply$1.apply(Global.scala:1609)
at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
at scala.tools.nsc.Global$Run$$anonfun$compileLate$2.apply(Global.scala:1609)
at scala.tools.nsc.Global$Run$$anonfun$compileLate$2.apply(Global.scala:1608)
at scala.collection.Iterator$class.foreach(Iterator.scala:742)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
at scala.tools.nsc.Global$Run.compileLate(Global.scala:1608)
at scala.tools.nsc.interactive.Global.scala$tools$nsc$interactive$Global$$parseAndEnter(Global.scala:656)
at scala.tools.nsc.interactive.Global$$anonfun$scala$tools$nsc$interactive$Global$$getParsedEnteredNow$1$$anonfun$apply$23.apply(Global.scala:1198)
at scala.tools.nsc.interactive.Global$$anonfun$scala$tools$nsc$interactive$Global$$getParsedEnteredNow$1$$anonfun$apply$23.apply(Global.scala:1197)
at scala.tools.nsc.interactive.CompilerControl$class.onUnitOf(CompilerControl.scala:63)
at scala.tools.nsc.interactive.Global.onUnitOf(Global.scala:104)
at scala.tools.nsc.interactive.Global$$anonfun$scala$tools$nsc$interactive$Global$$getParsedEnteredNow$1.apply(Global.scala:1197)
at scala.tools.nsc.interactive.Global$$anonfun$scala$tools$nsc$interactive$Global$$getParsedEnteredNow$1.apply(Global.scala:1197)
at scala.tools.nsc.interactive.Global$$anonfun$respond$1.apply(Global.scala:699)
at scala.tools.nsc.interactive.Global$$anonfun$respond$1.apply(Global.scala:699)
at scala.tools.nsc.interactive.Global.respondGradually(Global.scala:706)
at scala.tools.nsc.interactive.Global.respond(Global.scala:699)
at scala.tools.nsc.interactive.Global.scala$tools$nsc$interactive$Global$$getParsedEnteredNow(Global.scala:1196)
at scala.tools.nsc.interactive.Global.getParsedEntered(Global.scala:1187)
at scala.tools.nsc.interactive.CompilerControl$AskParsedEnteredItem.apply$mcV$sp(CompilerControl.scala:392)
at scala.tools.nsc.interactive.Global$$anonfun$pollForWork$1.apply$mcV$sp(Global.scala:504)
at scala.util.control.Breaks.breakable(Breaks.scala:38)
at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:429)
at scala.tools.nsc.interactive.PresentationCompilerThread.run(PresentationCompilerThread.scala:22)
The text was updated successfully, but these errors were encountered:
No, not at all. The typechecker is a complete mystery to me. Maybe @dragos has an idea where this problem is coming from. Since the
exception comes from paradise I assume the IDE or the PC in general
lacks some special initialization, which happens in the normal compiler.
Here it's not macros per se, it's the macro annotation engine interacting in bad ways with the presentation compiler. It seems that I've missed some of the invariants that aren't held when we move from the batch compiler to the interactive one.
I have the following piece of code:
And the following
build.sbt
, which depends on macrame:If I introduce a compilation error in
Test
or try to trigger code completion (actually I think it doesn't matter what is done as long as the PC in involved) it often (but not always) happens that the PC crashes. There are error messages shown like the following:The text was updated successfully, but these errors were encountered: