zinc
zinc copied to clipboard
[1.x] assertion failed: The <none> defined at <none> is not a class symbol
- [x] I've read the CONTRIBUTING guidelines
problem
1.x series of sbt throws
assertion failed:
[error] assertion failed:
[error] The <none> defined at <none> is not a class symbol.
[error] while compiling: /Users/<..>/Projects/xenomorph/modules/core/src/main/scala/xenomorph/HFunctor.scala
[error] during phase: xsbt-dependency
[error] library version: version 2.12.3
[error] compiler version: version 2.12.3
...
when compiling https://github.com/nuttycom/xenomorph
0.13.x series works well
notes
sbt version: 1.0.0 - 1.2.8
Here's the full stacktrace:
[error] last tree to typer: Ident(x)
[error] tree position: line 283 of /private/tmp/xenomorph/modules/core/src/main/scala/xenomorph/SchemaF.scala
[error] tree tpe: Boolean
[error] symbol: value x
[error] symbol definition: x: Boolean (a TermSymbol)
[error] symbol package: <none>
[error] symbol owners: value x
[error] call site: constructor package in package xenomorph in package xenomorph
[error]
[error] == Source file context for tree position ==
[error]
[error] 280 }
[error] 281 }
[error] 282
[error] 283 case class IsoSchema[P[_], F[_], I, J](base: F[I], iso: Iso[I, J]) extends SchemaF[P, F, J] {
[error] 284 def hfmap[G[_]](nt: F ~> G) = IsoSchema(nt(base), iso)
[error] 285 def pmap[Q[_]](nt: P ~> Q) = IsoSchema(base, iso)
[error] 286 }
[error] scala.tools.nsc.Global.assert(Global.scala:261)
[error] xsbt.Dependency$DependencyTraverser.xsbt$Dependency$DependencyTraverser$$addClassDependency(Dependency.scala:260)
[error] xsbt.Dependency$DependencyTraverser.addInheritanceDependency(Dependency.scala:346)
[error] xsbt.Dependency$DependencyTraverser.$anonfun$traverse$7(Dependency.scala:408)
[error] xsbt.Dependency$DependencyTraverser.$anonfun$traverse$7$adapted(Dependency.scala:407)
[error] scala.collection.immutable.Set$Set1.foreach(Set.scala:95)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:407)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:180)
[error] scala.reflect.internal.Trees.traverseComponents$1(Trees.scala:1321)
[error] scala.reflect.internal.Trees.itraverse(Trees.scala:1341)
[error] scala.reflect.internal.Trees.itraverse$(Trees.scala:1211)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:440)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:387)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:180)
[error] scala.reflect.api.Trees$Traverser.$anonfun$traverseTrees$1(Trees.scala:2484)
[error] scala.reflect.api.Trees$Traverser.traverseTrees(Trees.scala:2484)
[error] scala.reflect.api.Trees$Traverser.traverseTypeArgs(Trees.scala:2485)
[error] scala.reflect.internal.Trees.traverseComponents$1(Trees.scala:1324)
[error] scala.reflect.internal.Trees.itraverse(Trees.scala:1341)
[error] scala.reflect.internal.Trees.itraverse$(Trees.scala:1211)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:440)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:180)
[error] scala.reflect.internal.Trees.$anonfun$itraverse$1(Trees.scala:1221)
[error] scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
[error] scala.reflect.internal.Trees.traverseMemberDef$1(Trees.scala:1214)
[error] scala.reflect.internal.Trees.itraverse(Trees.scala:1339)
[error] scala.reflect.internal.Trees.itraverse$(Trees.scala:1211)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:440)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:180)
[error] scala.reflect.api.Trees$Traverser.$anonfun$traverseTrees$1(Trees.scala:2484)
[error] scala.reflect.api.Trees$Traverser.traverseTrees(Trees.scala:2484)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:415)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:180)
[error] scala.reflect.internal.Trees.traverseComponents$1(Trees.scala:1321)
[error] scala.reflect.internal.Trees.itraverse(Trees.scala:1341)
[error] scala.reflect.internal.Trees.itraverse$(Trees.scala:1211)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:440)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:387)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:180)
[error] scala.reflect.api.Trees$Traverser.$anonfun$traverseTrees$1(Trees.scala:2484)
[error] scala.reflect.api.Trees$Traverser.traverseTrees(Trees.scala:2484)
[error] scala.reflect.api.Trees$Traverser.traverseTypeArgs(Trees.scala:2485)
[error] scala.reflect.internal.Trees.traverseComponents$1(Trees.scala:1324)
[error] scala.reflect.internal.Trees.itraverse(Trees.scala:1341)
[error] scala.reflect.internal.Trees.itraverse$(Trees.scala:1211)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:440)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:427)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:180)
[error] scala.reflect.api.Trees$Traverser.traverseTypeAscription(Trees.scala:2478)
[error] scala.reflect.internal.Trees.$anonfun$itraverse$1(Trees.scala:1225)
[error] scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
[error] scala.reflect.internal.Trees.traverseMemberDef$1(Trees.scala:1214)
[error] scala.reflect.internal.Trees.itraverse(Trees.scala:1339)
[error] scala.reflect.internal.Trees.itraverse$(Trees.scala:1211)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:440)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:180)
[error] scala.reflect.api.Trees$Traverser.$anonfun$traverseTrees$1(Trees.scala:2484)
[error] scala.reflect.api.Trees$Traverser.traverseTrees(Trees.scala:2484)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:415)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:180)
[error] scala.reflect.internal.Trees.$anonfun$itraverse$1(Trees.scala:1218)
[error] scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
[error] scala.reflect.internal.Trees.traverseMemberDef$1(Trees.scala:1214)
[error] scala.reflect.internal.Trees.itraverse(Trees.scala:1339)
[error] scala.reflect.internal.Trees.itraverse$(Trees.scala:1211)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:439)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:180)
[error] scala.reflect.api.Trees$Traverser.$anonfun$traverseStats$2(Trees.scala:2498)
[error] scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
[error] scala.reflect.api.Trees$Traverser.$anonfun$traverseStats$1(Trees.scala:2498)
[error] scala.reflect.api.Trees$Traverser.traverseStats(Trees.scala:2497)
[error] scala.reflect.internal.Trees.itraverse(Trees.scala:1337)
[error] scala.reflect.internal.Trees.itraverse$(Trees.scala:1211)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
[error] scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
[error] xsbt.Dependency$DependencyTraverser.traverse(Dependency.scala:440)
[error] xsbt.Dependency$DependencyPhase.apply(Dependency.scala:57)
[error] scala.tools.nsc.Global$GlobalPhase.$anonfun$applyPhase$1(Global.scala:426)
[error] scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:419)
[error] scala.tools.nsc.Global$GlobalPhase.$anonfun$run$1(Global.scala:390)
[error] scala.tools.nsc.Global$GlobalPhase.$anonfun$run$1$adapted(Global.scala:390)
[error] scala.collection.Iterator.foreach(Iterator.scala:929)
[error] scala.collection.Iterator.foreach$(Iterator.scala:929)
[error] scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
[error] scala.tools.nsc.Global$GlobalPhase.run(Global.scala:390)
[error] xsbt.Dependency$DependencyPhase.run(Dependency.scala:45)
[error] scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1431)
[error] scala.tools.nsc.Global$Run.compileUnits(Global.scala:1416)
[error] scala.tools.nsc.Global$Run.compileSources(Global.scala:1412)
[error] scala.tools.nsc.Global$Run.compile(Global.scala:1515)
[error] xsbt.CachedCompiler0.run(CompilerInterface.scala:130)
[error] xsbt.CachedCompiler0.run(CompilerInterface.scala:105)
[error] xsbt.CompilerInterface.run(CompilerInterface.scala:31)
[error] sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] java.lang.reflect.Method.invoke(Method.java:498)
[error] sbt.internal.inc.AnalyzingCompiler.call(AnalyzingCompiler.scala:237)
[error] sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:111)
[error] sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:90)
[error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:86)
[error] scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:175)
[error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$3(MixedAnalyzingCompiler.scala:77)
[error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$3$adapted(MixedAnalyzingCompiler.scala:72)
[error] sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:205)
[error] sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:72)
[error] sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:137)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:338)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:338)
[error] sbt.internal.inc.Incremental$.doCompile(Incremental.scala:113)
[error] sbt.internal.inc.Incremental$.$anonfun$compile$4(Incremental.scala:94)
[error] sbt.internal.inc.IncrementalCommon.recompileClasses(IncrementalCommon.scala:175)
[error] sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:94)
[error] sbt.internal.inc.Incremental$.$anonfun$compile$3(Incremental.scala:96)
[error] sbt.internal.inc.Incremental$.manageClassfiles(Incremental.scala:145)
[error] sbt.internal.inc.Incremental$.compile(Incremental.scala:87)
[error] sbt.internal.inc.IncrementalCompile$.apply(Compile.scala:71)
[error] sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:343)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:296)
[error] sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:164)
[error] sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:244)
[error] sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:70)
[error] sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:1615)
[error] sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:1589)
[error] scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error] sbt.Execute.$anonfun$submit$2(Execute.scala:268)
[error] sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] sbt.Execute.work(Execute.scala:277)
[error] sbt.Execute.$anonfun$submit$1(Execute.scala:268)
[error] sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] java.lang.Thread.run(Thread.java:748)
https://github.com/sbt/zinc/blob/52286d0862cde407596efc3bb9ba6259d365d2ab/internal/compiler-bridge/src/main/scala/xsbt/Dependency.scala#L260 https://github.com/sbt/zinc/blob/52286d0862cde407596efc3bb9ba6259d365d2ab/internal/compiler-bridge/src/main/scala/xsbt/Dependency.scala#L346 https://github.com/sbt/zinc/blob/52286d0862cde407596efc3bb9ba6259d365d2ab/internal/compiler-bridge/src/main/scala/xsbt/Dependency.scala#L407-L410
Is there any possible workaround? This issue currently holds onle of my libraries on 0.13.18 :(
Same in 1.3.0-RC2
Still facing in 1.3.0
Could you come up with a minimized-ish example, so we can use it as a test? The fix itself should be fairly simple, which I'd be happy to work on.
For reference, here's an example script - https://github.com/sbt/zinc/tree/develop/zinc/src/sbt-test/source-dependencies/abstract-type
I made a repo https://github.com/danslapman/zinc-bug with minimal reproduction case, I couldn't reproduce it with a simple script :(
In fact I really wonder, why zinc involved here, compilation failes even on clean build...
Zinc is used on a clean build as well.
Still facing this in 1.4.2 😥
I tried hard to create a super-minimal reproduction case which can be added as a test, by unfortunately bug appears only with kind-projector involved.