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

Regression issue: compiler crashes with "java.lang.IllegalArgumentException: requirement failed: package parser" #10171

Closed
scabug opened this issue Feb 2, 2017 · 7 comments
Assignees

Comments

@scabug
Copy link

scabug commented Feb 2, 2017

I manage an open source library (Accord) that heavily uses macros, and have recently had reports that, when upgrading client code from 2.12.0 to 2.12.1, compilation breaks. I've managed to reproduce this with the attached sbt project (see below for sample output).

This is not merely a backwards compatibility issue, as it reproduces with a fresh local build of Accord with Scala 2.12.1. The reason I mentioned macros is that this issue seems quite similar to what Miles Sabin reported in [SI-9392], but his report never mentioned the initial "package parser" error and, if the ticket is accurate, a patch to make the compiler more lenient has made its way since before 2.12.0 went gold.

I'll be more than happy to help (contact me here, by e-mail at tomer@tomergabel.com, or through the project Gitter channel), but a quick glance at scala-reflect's Types.scala indicates that I'm completely out my depth here.

Output looks like this on my end:

pkunk:research tomerga$ sbt clean compile
[info] Loading global plugins from /Users/tomerga/.sbt/0.13/plugins
[info] Set current project to research (in build file:/Users/tomerga/research/)
[success] Total time: 0 s, completed Feb 3, 2017 1:43:58 AM
[info] Updating {file:/Users/tomerga/research/}research...
[info] Resolving jline#jline;2.14.1 ...
[info] Done updating.
[info] Compiling 1 Scala source to /Users/tomerga/research/target/scala-2.12/classes...
java.lang.IllegalArgumentException: requirement failed: package parser
	at scala.reflect.internal.Types$ModuleTypeRef.<init>(Types.scala:1879)
	at scala.reflect.internal.Types$PackageTypeRef.<init>(Types.scala:1897)
	at scala.reflect.internal.Types$TypeRef$.apply(Types.scala:2401)
	at scala.reflect.internal.Types.typeRef(Types.scala:3553)
	at scala.reflect.internal.Types.typeRef$(Types.scala:3536)
	at scala.reflect.internal.SymbolTable.typeRef(SymbolTable.scala:16)
	at scala.reflect.internal.Symbols$TypeSymbol.newTypeRef(Symbols.scala:3026)
	at scala.reflect.internal.Symbols$TypeSymbol.updateTypeCache(Symbols.scala:3079)
	at scala.reflect.internal.Symbols$TypeSymbol.maybeUpdateTypeCache(Symbols.scala:3065)
	at scala.reflect.internal.Symbols$TypeSymbol.tpe_$times(Symbols.scala:3043)
	at scala.reflect.internal.Symbols$Symbol.typeOfThis(Symbols.scala:2020)
	at scala.reflect.internal.Types$ThisType.underlying(Types.scala:1184)
	at scala.reflect.internal.Types$SimpleTypeProxy.boundSyms(Types.scala:150)
	at scala.reflect.internal.Types$SimpleTypeProxy.boundSyms$(Types.scala:150)
	at scala.reflect.internal.Types$SingletonType.boundSyms(Types.scala:1088)
	at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:734)
	at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:797)
	at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:110)
	at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:791)
	at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:110)
	at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:791)
	at scala.reflect.internal.Types$Type.substSym(Types.scala:727)
	at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:131)
	at scala.reflect.internal.transform.UnCurry$$anon$1.apply(UnCurry.scala:53)
	at scala.reflect.internal.transform.UnCurry.transformInfo(UnCurry.scala:154)
	at scala.reflect.internal.transform.UnCurry.transformInfo$(UnCurry.scala:148)
	at scala.tools.nsc.transform.UnCurry.transformInfo(UnCurry.scala:53)
	at scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:38)
	at scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1605)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1522)
	at scala.tools.nsc.transform.SpecializeTypes.$anonfun$specializeClass$31(SpecializeTypes.scala:808)
	at scala.tools.nsc.transform.SpecializeTypes.$anonfun$specializeClass$30(SpecializeTypes.scala:801)
	at scala.tools.nsc.transform.SpecializeTypes.specializeClass(SpecializeTypes.scala:799)
	at scala.tools.nsc.transform.SpecializeTypes.transformInfo(SpecializeTypes.scala:1215)
	at scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:38)
	at scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1605)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1522)
	at scala.reflect.internal.Types$TypeRef.baseClasses(Types.scala:2277)
	at scala.reflect.internal.Types.computeBaseClasses(Types.scala:1460)
	at scala.reflect.internal.Types.computeBaseClasses$(Types.scala:1437)
	at scala.reflect.internal.SymbolTable.computeBaseClasses(SymbolTable.scala:16)
	at scala.reflect.internal.Types.$anonfun$defineBaseClassesOfCompoundType$2(Types.scala:1581)
	at scala.reflect.internal.Types$CompoundType.memo(Types.scala:1414)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType(Types.scala:1581)
	at scala.reflect.internal.Types.define$1(Types.scala:1548)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType(Types.scala:1549)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType$(Types.scala:1547)
	at scala.reflect.internal.SymbolTable.defineBaseClassesOfCompoundType(SymbolTable.scala:16)
	at scala.reflect.internal.Types$CompoundType.baseClasses(Types.scala:1391)
	at scala.reflect.internal.Types.$anonfun$defineBaseClassesOfCompoundType$3(Types.scala:1581)
	at scala.reflect.internal.Types$CompoundType.memo(Types.scala:1414)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType(Types.scala:1581)
	at scala.reflect.internal.Types.define$1(Types.scala:1548)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType(Types.scala:1549)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType$(Types.scala:1547)
	at scala.reflect.internal.SymbolTable.defineBaseClassesOfCompoundType(SymbolTable.scala:16)
	at scala.reflect.internal.Types$CompoundType.baseClasses(Types.scala:1391)
	at scala.reflect.internal.Types$PolyType.baseClasses(Types.scala:2567)
	at scala.reflect.internal.Types$TypeRef.baseClasses(Types.scala:2277)
	at scala.reflect.internal.Types.computeBaseClasses(Types.scala:1460)
	at scala.reflect.internal.Types.computeBaseClasses$(Types.scala:1437)
	at scala.reflect.internal.SymbolTable.computeBaseClasses(SymbolTable.scala:16)
	at scala.reflect.internal.Types.$anonfun$defineBaseClassesOfCompoundType$2(Types.scala:1581)
	at scala.reflect.internal.Types$CompoundType.memo(Types.scala:1414)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType(Types.scala:1581)
	at scala.reflect.internal.Types.define$1(Types.scala:1548)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType(Types.scala:1549)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType$(Types.scala:1547)
	at scala.reflect.internal.SymbolTable.defineBaseClassesOfCompoundType(SymbolTable.scala:16)
	at scala.reflect.internal.Types$CompoundType.baseClasses(Types.scala:1391)
	at scala.reflect.internal.Types.$anonfun$defineBaseClassesOfCompoundType$3(Types.scala:1581)
	at scala.reflect.internal.Types$CompoundType.memo(Types.scala:1414)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType(Types.scala:1581)
	at scala.reflect.internal.Types.define$1(Types.scala:1548)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType(Types.scala:1549)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType$(Types.scala:1547)
	at scala.reflect.internal.SymbolTable.defineBaseClassesOfCompoundType(SymbolTable.scala:16)
	at scala.reflect.internal.Types$CompoundType.baseClasses(Types.scala:1391)
	at scala.reflect.internal.Types$PolyType.baseClasses(Types.scala:2567)
	at scala.reflect.internal.Types$TypeRef.baseClasses(Types.scala:2277)
	at scala.reflect.internal.Types.computeBaseClasses(Types.scala:1460)
	at scala.reflect.internal.Types.computeBaseClasses$(Types.scala:1437)
	at scala.reflect.internal.SymbolTable.computeBaseClasses(SymbolTable.scala:16)
	at scala.reflect.internal.Types.$anonfun$defineBaseClassesOfCompoundType$2(Types.scala:1581)
	at scala.reflect.internal.Types$CompoundType.memo(Types.scala:1414)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType(Types.scala:1581)
	at scala.reflect.internal.Types.define$1(Types.scala:1548)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType(Types.scala:1549)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType$(Types.scala:1547)
	at scala.reflect.internal.SymbolTable.defineBaseClassesOfCompoundType(SymbolTable.scala:16)
	at scala.reflect.internal.Types$CompoundType.baseClasses(Types.scala:1391)
	at scala.reflect.internal.Types.$anonfun$defineBaseClassesOfCompoundType$3(Types.scala:1581)
	at scala.reflect.internal.Types$CompoundType.memo(Types.scala:1414)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType(Types.scala:1581)
	at scala.reflect.internal.Types.define$1(Types.scala:1548)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType(Types.scala:1549)
	at scala.reflect.internal.Types.defineBaseClassesOfCompoundType$(Types.scala:1547)
	at scala.reflect.internal.SymbolTable.defineBaseClassesOfCompoundType(SymbolTable.scala:16)
	at scala.reflect.internal.Types$CompoundType.baseClasses(Types.scala:1391)
	at scala.reflect.internal.Types$PolyType.baseClasses(Types.scala:2567)
	at scala.reflect.internal.Symbols$Symbol.ancestors(Symbols.scala:2129)
	at scala.reflect.internal.Symbols$Symbol.mixinClasses(Symbols.scala:2125)
	at scala.tools.nsc.transform.ExplicitOuter.transformInfo(ExplicitOuter.scala:178)
	at scala.tools.nsc.transform.ExplicitOuter.transformInfo(ExplicitOuter.scala:194)
	at scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:38)
	at scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1605)
	at scala.reflect.internal.Symbols$Symbol.hasCompleteInfo(Symbols.scala:1569)
	at scala.tools.nsc.backend.jvm.BCodeHelpers.completeSilentlyAndCheckErroneous(BCodeHelpers.scala:229)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$classBTypeFromSymbol$5(BTypesFromSymbols.scala:122)
	at scala.collection.MapLike.getOrElse(MapLike.scala:128)
	at scala.collection.MapLike.getOrElse$(MapLike.scala:126)
	at scala.collection.concurrent.TrieMap.getOrElse(TrieMap.scala:631)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.classBTypeFromSymbol(BTypesFromSymbols.scala:118)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.buildNestedInfo(BTypesFromSymbols.scala:486)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.setClassInfo(BTypesFromSymbols.scala:442)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$classBTypeFromSymbol$5(BTypesFromSymbols.scala:126)
	at scala.collection.MapLike.getOrElse(MapLike.scala:128)
	at scala.collection.MapLike.getOrElse$(MapLike.scala:126)
	at scala.collection.concurrent.TrieMap.getOrElse(TrieMap.scala:631)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.classBTypeFromSymbol(BTypesFromSymbols.scala:118)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$typeToBType$1(BTypesFromSymbols.scala:177)
	at scala.collection.MapLike.getOrElse(MapLike.scala:128)
	at scala.collection.MapLike.getOrElse$(MapLike.scala:126)
	at scala.collection.AbstractMap.getOrElse(Map.scala:59)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.primitiveOrClassToBType$1(BTypesFromSymbols.scala:177)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.typeToBType(BTypesFromSymbols.scala:192)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.methodBTypeFromMethodType(BTypesFromSymbols.scala:146)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.methodBTypeFromSymbol(BTypesFromSymbols.scala:137)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$buildInlineInfoFromClassSymbol$5(BTypesFromSymbols.scala:583)
	at scala.collection.Iterator$$anon$11.nextCur(Iterator.scala:473)
	at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:479)
	at scala.collection.Iterator.foreach(Iterator.scala:929)
	at scala.collection.Iterator.foreach$(Iterator.scala:929)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1406)
	at scala.collection.TraversableOnce.toMap(TraversableOnce.scala:316)
	at scala.collection.TraversableOnce.toMap$(TraversableOnce.scala:314)
	at scala.collection.AbstractIterator.toMap(Iterator.scala:1406)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.buildInlineInfoFromClassSymbol(BTypesFromSymbols.scala:616)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.buildFromSymbol$1(BTypesFromSymbols.scala:522)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.buildInlineInfo(BTypesFromSymbols.scala:527)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.setClassInfo(BTypesFromSymbols.scala:444)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$classBTypeFromSymbol$5(BTypesFromSymbols.scala:126)
	at scala.collection.MapLike.getOrElse(MapLike.scala:128)
	at scala.collection.MapLike.getOrElse$(MapLike.scala:126)
	at scala.collection.concurrent.TrieMap.getOrElse(TrieMap.scala:631)
	at scala.tools.nsc.backend.jvm.BTypesFromSymbols.classBTypeFromSymbol(BTypesFromSymbols.scala:118)
	at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen.internalName(BCodeHelpers.scala:529)
	at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen.internalName$(BCodeHelpers.scala:529)
	at scala.tools.nsc.backend.jvm.BCodeHelpers$JCommonBuilder.internalName(BCodeHelpers.scala:1031)
	at scala.tools.nsc.backend.jvm.BCodeHelpers$BCForwardersGen.addForwarder(BCodeHelpers.scala:901)
	at scala.tools.nsc.backend.jvm.BCodeHelpers$BCForwardersGen.$anonfun$addForwarders$4(BCodeHelpers.scala:981)
	at scala.tools.nsc.backend.jvm.BCodeHelpers$BCForwardersGen.$anonfun$addForwarders$4$adapted(BCodeHelpers.scala:972)
	at scala.reflect.internal.Scopes$Scope.foreach(Scopes.scala:373)
	at scala.tools.nsc.backend.jvm.BCodeHelpers$BCForwardersGen.addForwarders(BCodeHelpers.scala:972)
	at scala.tools.nsc.backend.jvm.BCodeHelpers$BCForwardersGen.addForwarders$(BCodeHelpers.scala:962)
	at scala.tools.nsc.backend.jvm.BCodeHelpers$JCommonBuilder.addForwarders(BCodeHelpers.scala:1031)
	at scala.tools.nsc.backend.jvm.BCodeHelpers$JMirrorBuilder.genMirrorClass(BCodeHelpers.scala:1070)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker1.visit(GenBCode.scala:181)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker1.$anonfun$run$1(GenBCode.scala:139)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker1.run(GenBCode.scala:139)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.buildAndSendToDisk(GenBCode.scala:381)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.run(GenBCode.scala:350)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1418)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1403)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1398)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1492)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
	at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:107)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:53)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:74)
	at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:49)
	at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:64)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
	at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:32)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:72)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:71)
	at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:99)
	at sbt.inc.Incremental$.compile(Incremental.scala:71)
	at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
	at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
	at sbt.Compiler$.compile(Compiler.scala:155)
	at sbt.Compiler$.compile(Compiler.scala:141)
	at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:879)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:870)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:868)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:237)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[error] Error while emitting Test.scala
[error] requirement failed: package parser
java.lang.AssertionError: assertion failed: ClassBType.info not yet assigned: LTest$;
	at scala.tools.nsc.backend.jvm.BTypes$ClassBType.info(BTypes.scala:861)
	at scala.tools.nsc.backend.jvm.BTypes$ClassBType.isInterface(BTypes.scala:904)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genCallMethod(BCodeBodyBuilder.scala:1073)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genApply(BCodeBodyBuilder.scala:701)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:298)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genStat(BCodeBodyBuilder.scala:82)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.$anonfun$genBlock$1(BCodeBodyBuilder.scala:812)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genBlock(BCodeBodyBuilder.scala:812)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:364)
	at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.emitNormalMethodBody$1(BCodeSkelBuilder.scala:603)
	at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.genDefDef(BCodeSkelBuilder.scala:635)
	at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.gen(BCodeSkelBuilder.scala:509)
	at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.$anonfun$gen$7(BCodeSkelBuilder.scala:511)
	at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.gen(BCodeSkelBuilder.scala:511)
	at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.genPlainClass(BCodeSkelBuilder.scala:113)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker1.visit(GenBCode.scala:190)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker1.$anonfun$run$1(GenBCode.scala:139)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker1.run(GenBCode.scala:139)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.buildAndSendToDisk(GenBCode.scala:381)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.run(GenBCode.scala:350)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1418)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1403)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1398)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1492)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
	at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:107)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:53)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:74)
	at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:49)
	at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:64)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
	at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:32)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:72)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:71)
	at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:99)
	at sbt.inc.Incremental$.compile(Incremental.scala:71)
	at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
	at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
	at sbt.Compiler$.compile(Compiler.scala:155)
	at sbt.Compiler$.compile(Compiler.scala:141)
	at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:879)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:870)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:868)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:237)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[error] Error while emitting Test.scala
[error] assertion failed: ClassBType.info not yet assigned: LTest$;
java.lang.AssertionError: assertion failed: ClassBType.info not yet assigned: LTest$;
	at scala.tools.nsc.backend.jvm.BTypes$ClassBType.info(BTypes.scala:861)
	at scala.tools.nsc.backend.jvm.BTypes$ClassBType.isNestedClass(BTypes.scala:924)
	at scala.tools.nsc.backend.jvm.analysis.BackendUtils.visitInternalName$1(BackendUtils.scala:266)
	at scala.tools.nsc.backend.jvm.analysis.BackendUtils.collectNestedClasses(BackendUtils.scala:331)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker2.setInnerClasses(GenBCode.scala:253)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker2.run(GenBCode.scala:268)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.buildAndSendToDisk(GenBCode.scala:384)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.run(GenBCode.scala:350)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1418)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1403)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1398)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1492)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
	at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:107)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:53)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:74)
	at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:49)
	at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:64)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
	at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:32)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:72)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:71)
	at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:99)
	at sbt.inc.Incremental$.compile(Incremental.scala:71)
	at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
	at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
	at sbt.Compiler$.compile(Compiler.scala:155)
	at sbt.Compiler$.compile(Compiler.scala:141)
	at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:879)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:870)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:868)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:237)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[error] Error while emitting Test$$anon$1
[error] assertion failed: ClassBType.info not yet assigned: LTest$;
java.lang.AssertionError: assertion failed: ClassBType.info not yet assigned: LTest$;
	at scala.tools.nsc.backend.jvm.BTypes$ClassBType.info(BTypes.scala:861)
	at scala.tools.nsc.backend.jvm.BTypes$ClassBType.isNestedClass(BTypes.scala:924)
	at scala.tools.nsc.backend.jvm.analysis.BackendUtils.visitInternalName$1(BackendUtils.scala:266)
	at scala.tools.nsc.backend.jvm.analysis.BackendUtils.collectNestedClasses(BackendUtils.scala:331)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker2.setInnerClasses(GenBCode.scala:253)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase$Worker2.run(GenBCode.scala:268)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.buildAndSendToDisk(GenBCode.scala:384)
	at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.run(GenBCode.scala:350)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1418)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1403)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1398)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1492)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
	at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:107)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:53)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:74)
	at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:49)
	at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:64)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
	at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:32)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:72)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:71)
	at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:99)
	at sbt.inc.Incremental$.compile(Incremental.scala:71)
	at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
	at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
	at sbt.Compiler$.compile(Compiler.scala:155)
	at sbt.Compiler$.compile(Compiler.scala:141)
	at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:879)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:870)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:868)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:237)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[error] Error while emitting Test$$anon$2
[error] assertion failed: ClassBType.info not yet assigned: LTest$;
[error] four errors found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 8 s, completed Feb 3, 2017 1:44:05 AM
@scabug
Copy link
Author

scabug commented Feb 2, 2017

Imported From: https://issues.scala-lang.org/browse/SI-10171?orig=1
Reporter: Tomer Gabel (holograph)
Affected Versions: 2.12.1
See #9392
Attachments:

@scabug
Copy link
Author

scabug commented Feb 2, 2017

@retronym said:
I'm hopeful that scala/scala#5671 will fix this in 2.12.2. I'll test this out in the coming days.

@scabug
Copy link
Author

scabug commented Feb 3, 2017

Tomer Gabel (holograph) said:
I'm hopeful too, but in the meantime I'm worried about the ramifications for existing users. Is this recognizable as one of the cases 5671 addresses? Are there any workarounds or tricks I could try to at least get them through the door in the short term?

(I apologize in advance if this response seems snippy or demanding. I highly respect and appreciate your work and responsiveness to this issue and others I've run into. I'm merely hoping that an analgesic is available for my more woeful users :-))

@scabug
Copy link
Author

scabug commented Feb 4, 2017

@retronym said:
Your sample project compiles with Scala 2.12.1 if you explicitly declare a dependency on scala-compiler.jar.

% sbt
> set libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value
[info] Defining *:libraryDependencies
[info] The new value will be used by *:allDependencies, *:dependencyPositions
[info] Reapplying settings...
[info] Set current project to compiler-crash-demo (in build file:/Users/jason/code/compiler-crash-demo/)
> compile

It also compiles with the latest version of PR 5671:

% sbt
[info] Loading global plugins from /Users/jason/.sbt/0.13/plugins
[info] Set current project to compiler-crash-demo (in build file:/Users/jason/code/compiler-crash-demo/)
> set scalaHome := Some(file("/code/scala/build/pack"))
[info] Defining *:scalaHome
[info] The new value will be used by *:allDependencies, *:evicted and 5 others.
[info] 	Run `last` for details.
[info] Reapplying settings...
[info] Set current project to compiler-crash-demo (in build file:/Users/jason/code/compiler-crash-demo/)
> compile
[info] Updating {file:/Users/jason/code/compiler-crash-demo/}compiler-crash-demo...
[info] Resolving com.wix#accord-core_2.12;0.7-SNAPSHOT ...
[warn] Unable to reparse com.wix#accord-core_2.12;0.7-SNAPSHOT from sonatype-snapshots, using Fri Feb 03 11:40:32 MST 2017
[info] Resolving com.wix#accord-api_2.12;0.7-SNAPSHOT ...
[warn] Unable to reparse com.wix#accord-api_2.12;0.7-SNAPSHOT from sonatype-snapshots, using Fri Feb 03 11:40:20 MST 2017
[info] Resolving org.scala-lang#scala-reflect;2.12.1 ...
[info] Done updating.
[info] Compiling 1 Scala source to /Users/jason/code/compiler-crash-demo/target/scala-2.12/classes...
[success] Total time: 13 s, completed 03/02/2017 11:00:34 PM

Compiling with -Ydebug gives some small hint as to the reference to the missing symbol:

[warn] !!! creating stub symbol to defer error: missing or invalid dependency detected while loading class file 'MacroHelper.class'.
[warn] Could not access term tools in package class scala,
[warn] because it (or its dependencies) are missing. Check your build definition for
[warn] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[warn] A full rebuild may help if 'MacroHelper.class' was compiled against an incompatible version of scala.
[warn] !!! creating stub symbol to defer error: missing or invalid dependency detected while loading class file 'MacroHelper.class'.
[warn] Could not access term nsc in class scala.tools,

I suspect the reference to the compiler internal class leaks into MacroHelper.class due a poor interaction of TypeTag-s and existential types, but I haven't dug in. You might try replacing:

core/src/main/scala/com/tomergabel/accord/transform/ValidationTransform.scala:  private val validatorType = typeOf[ Validator[_] ]
core/src/main/scala/com/tomergabel/accord/transform/ValidationTransform.scala:    private val descriptorTerm = typeOf[ dsl.Descriptor[_] ].typeSymbol.name.toTermName
core/src/main/scala/com/tomergabel/accord/transform/ValidationTransform.scala:    private val contextualizerTerm = typeOf[ dsl.Contextualizer[_] ].typeSymbol.name.toTermName
core/src/main/scala/com/tomergabel/accord/transform/ValidationTransform.scala:    val vtype = TypeTree( appliedType( validatorType.typeConstructor, weakTypeOf[ T ] :: Nil ) )

with non existental types, such as typeOf[Validator[Any] to see if that avoids the initial bug in the Scala reflection.

@scabug
Copy link
Author

scabug commented Feb 4, 2017

@retronym said:
Or maybe, move this code out of MacroHelper:

  protected def newUnitParser( code: String ): ast.parser.Parsers#UnitParser = {
    val g: Global = context.asInstanceOf[ reflect.macros.runtime.Context ].global
    g.newUnitParser( code, "<Accord>" )
  }

@scabug
Copy link
Author

scabug commented Feb 5, 2017

Tomer Gabel (holograph) said:
Thanks, I can confirm the dependency workaround works. I'll look into the code-based fixes when I find a bit of spare time, although as I understand it these are pretty valid use cases (and the unit parser code is, alas, absolutely required for "correct"-ish description of expressions, which is one of Accord's major features to begin with).

Again thanks for your help!

@som-snytt
Copy link

scala/scala#5671 as commented. Downstream ticket is also closed.

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

No branches or pull requests

4 participants