Compiler crash at same location under 2.11.8 and 2.12.0

193 views
Skip to first unread message

Jacques Lemieux

unread,
Nov 21, 2016, 2:17:23 PM11/21/16
to scala-internals

I am receiving the exception below when I do a clean compile of my project in SBT. The exact same exception occurs under both 2.11.8 and 2.12.0.

It is currently difficult for me to identify what is causing this exception, because I just did a major refactoring of my code, so plenty of things changed recently.

My own code does not use macros.

I do not know if it is the proper place to report this bug. I guess it is by looking at previous posts. Sorry if I am wrong.

I would be grateful if someone could suggest a way to resolve this issue because now I am kind of stuck.

Thank you.

JL

=====================

build.sbt

name := "restless-core"

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins()

scalaVersion := "2.11.8"

scalacOptions += "-feature"
scalacOptions += "-language:postfixOps"
scalacOptions += "-language:implicitConversions"
scalacOptions += "-language:higherKinds"
scalacOptions += "-language:existentials"

libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.5.0"
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.1.7"

libraryDependencies ++= Seq("org.specs2" %% "specs2-core" % "3.8.6" % "test")
scalacOptions in Test ++= Seq("-Yrangepos")
libraryDependencies += "junit" % "junit" % "4.12"


libraryDependencies += "com.coremigration" %% "coremigration-i18n-rt" % "1.0.0-SNAPSHOT"

=====================

Trace under 2.12.0

[debug] Running cached compiler 41ea849b, interfacing (CompilerInterface) with Scala compiler version 2.12.0
[debug] Calling Scala compiler with arguments  (CompilerInterface):
[debug] -feature
[debug] -language:postfixOps
[debug] -language:implicitConversions
[debug] -language:higherKinds
[debug] -language:existentials
[debug] -bootclasspath
[debug] /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfr.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/classes:/home/jacques/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.0.jar
[debug] -classpath
[debug] /home/jacques/Documents/Projects/ActorDemo/core/target/scala-2.12/classes:/home/jacques/Documents/Projects/ActorDemo/core/lib/ojdbc7.jar:/home/jacques/.ivy2/cache/com.typesafe.scala-logging/scala-logging_2.12/bundles/scala-logging_2.12-3.5.0.jar:/home/jacques/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.12.0.jar:/home/jacques/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.7.21.jar:/home/jacques/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-classic-1.1.7.jar:/home/jacques/.ivy2/cache/ch.qos.logback/logback-core/jars/logback-core-1.1.7.jar:/home/jacques/.ivy2/cache/junit/junit/jars/junit-4.12.jar:/home/jacques/.ivy2/cache/org.hamcrest/hamcrest-core/jars/hamcrest-core-1.3.jar:/home/jacques/.ivy2/local/com.coremigration/coremigration-i18n-rt_2.12/1.0.0-SNAPSHOT/jars/coremigration-i18n-rt_2.12.jar
java.util.NoSuchElementException: head of empty list
at scala.collection.immutable.Nil$.head(List.scala:417)
at scala.collection.immutable.Nil$.head(List.scala:414)
at scala.tools.nsc.typechecker.ContextErrors$InferencerContextErrors$InferErrorGen$.NotWithinBoundsErrorMessage(ContextErrors.scala:1048)
at scala.tools.nsc.typechecker.ContextErrors$InferencerContextErrors$InferErrorGen$.NotWithinBounds(ContextErrors.scala:1055)
at scala.tools.nsc.typechecker.Infer$Inferencer.issueBoundsError$1(Infer.scala:889)
at scala.tools.nsc.typechecker.Infer$Inferencer.check$1(Infer.scala:895)
at scala.tools.nsc.typechecker.Infer$Inferencer.checkBounds(Infer.scala:899)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkBounds(RefChecks.scala:1203)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkTypeRef(RefChecks.scala:1384)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.$anonfun$transform$4(RefChecks.scala:1662)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.$anonfun$transform$4$adapted(RefChecks.scala:1653)
at scala.reflect.internal.tpe.TypeMaps$ForEachTypeTraverser.traverse(TypeMaps.scala:1072)
at scala.reflect.internal.Types$Type.foreach(Types.scala:767)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1407)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:107)
at scala.reflect.internal.Trees.$anonfun$itransform$2(Trees.scala:1367)
at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
at scala.reflect.internal.Trees.itransform(Trees.scala:1365)
at scala.reflect.internal.Trees.itransform$(Trees.scala:1340)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1745)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:1198)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.$anonfun$transformStats$1(RefChecks.scala:1169)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:1169)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:107)
at scala.reflect.internal.Trees.itransform(Trees.scala:1408)
at scala.reflect.internal.Trees.itransform$(Trees.scala:1340)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1745)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:107)
at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2563)
at scala.reflect.internal.Trees.$anonfun$itransform$4(Trees.scala:1412)
at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
at scala.reflect.internal.Trees.itransform(Trees.scala:1411)
at scala.reflect.internal.Trees.itransform$(Trees.scala:1340)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1745)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:1198)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.$anonfun$transformStats$1(RefChecks.scala:1169)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:1169)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:107)
at scala.reflect.internal.Trees.$anonfun$itransform$7(Trees.scala:1430)
at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
at scala.reflect.internal.Trees.itransform(Trees.scala:1430)
at scala.reflect.internal.Trees.itransform$(Trees.scala:1340)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1745)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:107)
at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:140)
at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
at scala.tools.nsc.Global$GlobalPhase.$anonfun$applyPhase$1(Global.scala:402)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:395)
at scala.tools.nsc.Global$GlobalPhase.$anonfun$run$1(Global.scala:366)
at scala.tools.nsc.Global$GlobalPhase.$anonfun$run$1$adapted(Global.scala:366)
at scala.collection.AbstractIterator.foreach(Iterator.scala:932)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:366)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1404)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1389)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1384)
at scala.tools.nsc.Global$Run.compile(Global.scala:1478)
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] (compile:compileIncremental) java.util.NoSuchElementException: head of empty list

Trace under 2.11.8

[debug] Running cached compiler 78014b52, interfacing (CompilerInterface) with Scala compiler version 2.11.8
[debug] Calling Scala compiler with arguments  (CompilerInterface):
[debug] -feature
[debug] -language:postfixOps
[debug] -language:implicitConversions
[debug] -language:higherKinds
[debug] -language:existentials
[debug] -bootclasspath
[debug] /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfr.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/classes:/home/jacques/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.8.jar
[debug] -classpath
[debug] /home/jacques/Documents/Projects/ActorDemo/core/target/scala-2.11/classes:/home/jacques/Documents/Projects/ActorDemo/core/lib/ojdbc7.jar:/home/jacques/.ivy2/cache/com.typesafe.scala-logging/scala-logging_2.11/bundles/scala-logging_2.11-3.5.0.jar:/home/jacques/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.11.8.jar:/home/jacques/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.7.21.jar:/home/jacques/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-classic-1.1.7.jar:/home/jacques/.ivy2/cache/ch.qos.logback/logback-core/jars/logback-core-1.1.7.jar:/home/jacques/.ivy2/cache/junit/junit/jars/junit-4.12.jar:/home/jacques/.ivy2/cache/org.hamcrest/hamcrest-core/jars/hamcrest-core-1.3.jar:/home/jacques/.ivy2/local/com.coremigration/coremigration-i18n-rt_2.11/1.0.0-SNAPSHOT/jars/coremigration-i18n-rt_2.11.jar
java.util.NoSuchElementException: head of empty list
at scala.collection.immutable.Nil$.head(List.scala:420)
at scala.collection.immutable.Nil$.head(List.scala:417)
at scala.tools.nsc.typechecker.ContextErrors$InferencerContextErrors$InferErrorGen$.NotWithinBoundsErrorMessage(ContextErrors.scala:1011)
at scala.tools.nsc.typechecker.ContextErrors$InferencerContextErrors$InferErrorGen$.NotWithinBounds(ContextErrors.scala:1018)
at scala.tools.nsc.typechecker.Infer$Inferencer.issueBoundsError$1(Infer.scala:887)
at scala.tools.nsc.typechecker.Infer$Inferencer.check$1(Infer.scala:893)
at scala.tools.nsc.typechecker.Infer$Inferencer.checkBounds(Infer.scala:897)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.checkBounds(RefChecks.scala:1267)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.scala$tools$nsc$typechecker$RefChecks$RefCheckTransformer$$checkTypeRef(RefChecks.scala:1448)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$32.apply(RefChecks.scala:1702)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$32.apply(RefChecks.scala:1693)
at scala.reflect.internal.tpe.TypeMaps$ForEachTypeTraverser.traverse(TypeMaps.scala:1051)
at scala.reflect.internal.Types$Type.foreach(Types.scala:757)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1693)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:111)
at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1363)
at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1361)
at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
at scala.reflect.internal.Trees$class.itransform(Trees.scala:1360)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1785)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:1262)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1165)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1165)
at scala.collection.immutable.List.flatMap(List.scala:327)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:1165)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:111)
at scala.reflect.internal.Trees$class.itransform(Trees.scala:1404)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1785)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:111)
at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2563)
at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1408)
at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1407)
at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
at scala.reflect.internal.Trees$class.itransform(Trees.scala:1406)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1785)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:1262)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1165)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1165)
at scala.collection.immutable.List.flatMap(List.scala:327)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:1165)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:111)
at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
at scala.reflect.internal.Trees$class.itransform(Trees.scala:1425)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1785)
at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:111)
at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:147)
at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
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$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:398)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1501)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1486)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1481)
at scala.tools.nsc.Global$Run.compile(Global.scala:1582)
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)


Seth Tisue

unread,
Nov 21, 2016, 5:03:55 PM11/21/16
to scala-i...@googlegroups.com

Jacques Lemieux

unread,
Nov 22, 2016, 12:16:48 PM11/22/16
to scala-i...@googlegroups.com

I have git-cloned the Scala compiler from github, I checked out v2.11.8 and issued commands "compile" and "dist/mkPack" to create a standalone compiler utility. I then called the newly generated scalac utility with the same parameters I found in the SBT stack trace + all my Scala source files. Strangely, the stand-alone compiler doesn't crash anymore. Either my version 2.11.8 is not the same as the "standard" one, or the compiler crash is contingent upon the order in which the Scala source files are specified?

--
You received this message because you are subscribed to a topic in the Google Groups "scala-internals" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-internals/S5eOumRh5_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stefan Zeiger

unread,
Nov 22, 2016, 1:03:27 PM11/22/16
to scala-i...@googlegroups.com
On 2016-11-22 18:16, Jacques Lemieux wrote:

I have git-cloned the Scala compiler from github, I checked out v2.11.8 and issued commands "compile" and "dist/mkPack" to create a standalone compiler utility. I then called the newly generated scalac utility with the same parameters I found in the SBT stack trace + all my Scala source files. Strangely, the stand-alone compiler doesn't crash anymore. Either my version 2.11.8 is not the same as the "standard" one, or the compiler crash is contingent upon the order in which the Scala source files are specified?


The standard compiler distribution goes through an extra bootstrapping step and it is built with optimization enabled (see https://github.com/scala/scala/blob/2.12.x/scripts/jobs/integrate/bootstrap), plus in 2.11.x it is still built with ant.

Adriaan Moors

unread,
Nov 22, 2016, 2:06:30 PM11/22/16
to scala-i...@googlegroups.com
And, yes, it is quite possible that a compiler bug is sensitive to compilation order. If you're using sbt to build your project, you can easily publishLocal your local build of Scala and use it from your project by changing the Scala version under which you published your local build.

--
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.

Jacques Lemieux

unread,
Nov 22, 2016, 2:16:43 PM11/22/16
to scala-i...@googlegroups.com

Many thanks for your answers, Stefan and Adriaan.

Indeed, I have tried to publishLocal. If I generate the scala compiler with its own custom scala version number, say "2.11.8-JL", then SBT tries to use this version to find *all* dependencies, including Play libraries, loggers, jdbc, absolutely everything. I would thus like to be able to generate a "plain" local version 2.11.8 and configure SBT so that it would pick it up. I obviously tried to simply use 2.11.8, my own version was never picked up with 2.11.8. I fiddled with the scalaHome setting to no avail. Any clue?

Thank you !

JL, Montréal.

You received this message because you are subscribed to a topic in the Google Groups "scala-internals" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-internals/S5eOumRh5_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-interna...@googlegroups.com.

Jacques Lemieux

unread,
Nov 22, 2016, 3:07:00 PM11/22/16
to scala-i...@googlegroups.com

I apologize, once I corrected the new errors reported by the scala compiler that I compiled myself, my own compiler also crashed with the same exception as before. So it was simply a matter of input source file sequencing. At the end, my own compiler 2.11.8 behaves like the standard 2.11.8 one.

I am kind of stuck with this issue because I made huge amount of changes in my code these last two weeks, and I am totally unable to determine what can be wrong. It is not as if I had 100% compile-able  code, changed a little method, recompiled to discover this compiler crash.

Any possibility this bug could be fixed in 2.11.8 ?

JL


Le 2016-11-22 à 14:06, Adriaan Moors a écrit :
You received this message because you are subscribed to a topic in the Google Groups "scala-internals" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-internals/S5eOumRh5_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-interna...@googlegroups.com.

Jacques Lemieux

unread,
Nov 22, 2016, 3:45:29 PM11/22/16
to scala-i...@googlegroups.com

I made a patch to the method "NotWithinBoundsErrorMessage" in file /src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala so that the message would contain "<no owner>" when tparams is an empty list, instead of crashing as it does now.

Now with my "custom patched compiler", I get this error message:

./app/com/coremigration/restless/data/OracleRowLike.scala:12: error: type arguments [T] do not conform to <no owner>'s type parameter bounds []
  def rowid =
      ^  (the caret points to "rowid")

that appears in this trait:

trait OracleRowLike[T <: OracleTableDefinition[T]] extends RowLike[T] {

  [...]

  def rowid =
    toDatumLinker[PhRowidFactory](tableDefinition.rowid)
}

Where "toDatumLinker" is defined as:

  def toDatumLinker[F <: PhFactory[F]](col: F#Col[T]) =
    col.factory.link[T](col, bufferEntry)

And PhFactory having this relevant member "Col" :

trait PhFactory[F <: PhFactory[F]] {

  type Col[TD <: TableDefinition[TD]] <: Column[TD, F]
}

And Column being a class with this type signature:

class Column[T <: TableDefinition[T], F <: PhFactory[F]]

Any clue why the compiler would crash on this source code? I can't see what's wrong in my typing, it seems all pretty "normal" to me...

Many thanks for helping me to move forward in my project.

JL



Le 2016-11-22 à 14:06, Adriaan Moors a écrit :
You received this message because you are subscribed to a topic in the Google Groups "scala-internals" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-internals/S5eOumRh5_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-interna...@googlegroups.com.

Seth Tisue

unread,
Nov 22, 2016, 4:15:16 PM11/22/16
to scala-i...@googlegroups.com
On Tue, Nov 22, 2016 at 11:16 AM, Jacques Lemieux <jac...@lemieux.cc> wrote:

Many thanks for your answers, Stefan and Adriaan.

Indeed, I have tried to publishLocal. If I generate the scala compiler with its own custom scala version number, say "2.11.8-JL", then SBT tries to use this version to find *all* dependencies

additionally setting scalaBinaryVersion to “2.11” will prevent that from happening

Jacques Lemieux

unread,
Nov 22, 2016, 4:26:34 PM11/22/16
to scala-i...@googlegroups.com

Many thanks to everyone, I found the exact bug that crashes the compiler.

The "PhFactory" I refer to in my previous email also had these members:

  type T <: PhDatum[F]
  type L[TD <: TableDefinition[TD]] <: T with PhDatumLinker[TD, F]

  def link[TD <: TableDefinition[TD]](column: F#Col[TD], bufferEntry: BufferEntry[TD]): F#L[TD]

I was using this with a concrete factory called PhCharacterFactory that had this concrete type implementation:

  type L = PhCharacterLink[_]

Instead of:

  type L[TD <: TableDefinition[TD]] = PhCharacterLink[TD]

Now, would it be useful to your team if I were to build a smaller test case demonstrating the bug I had that crashes the compiler? If so, where should I post it?

Many thanks again.

JL, Montréal.

Adriaan Moors

unread,
Nov 22, 2016, 5:18:05 PM11/22/16
to scala-i...@googlegroups.com
Great detective work, Jacques! A small test case would be most welcome at https://issues.scala-lang.org or on https://github.com/scala/scala-dev/issues

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.

Jacques Lemieux

unread,
Nov 22, 2016, 6:10:21 PM11/22/16
to scala-i...@googlegroups.com

I changed my line

  type L[TD <: TableDefinition[TD]] = PhCharacterLink[TD]

back to

type L = PhCharacterLink[_]

If I run the Bash script that calls my "own" scalac compiler, I see the same errors as before (these errors would crash the standard 2.11.8 compiler, because an exception would be generated while formating the error message). So it is obvious that this single line breaks the compiler.

But... not always, so I will rephrase, "this single line might break the compiler".

If I do a clean compile in Eclipse, or if I do a sbt clean compile, I now get this error:

error] /home/jacques/Documents/Projects/ActorDemo/app/com/coremigration/restless/types/PhCharacterFactory.scala:23: overriding type L in trait PhFactory with bounds[TD <: com.coremigration.restless.data.TableDefinition[TD]] <: PhCharacterFactory.this.T with com.coremigration.restless.types.PhDatumLinker[TD,com.coremigration.restless.types.PhCharacterFactory];
[error]  type L has incompatible type
[error]   type L = PhCharacterLink[_]
[error]        ^

In the past, the compiler would also crash in the context of SBT or Eclipse.

So changing the above line is not the only factor that makes the compiler crash or not, the ordering of input scala files might be a factor too (I say this because the ordering of input scala files generated by Eclipse and by SBT is likely different than my own ordering, which was obtained by a simple find . -name '*.scala'.

So I am unable to replicate the bug with a smaller number of lines because the bug no longer appears in my normal code.

This is really bizarre, I am likely missing something here...

Thank you.

JL

Jacques Lemieux

unread,
Nov 23, 2016, 10:27:38 AM11/23/16
to scala-i...@googlegroups.com

To follow up on Seth's suggestion, I have tried this:

1) Updated Scala compiler's build.sbt file with:

baseVersion in Global := "2.11.8"
baseVersionSuffix in Global := "JL"

2) Compiled and published local the Scala compiler with sbt commands "compile" and "publishLocal" (all successfully).

3) Updated my own project's build.sbt file with:

scalaVersion := "2.11.8-JL"
scalaVersion in Test := "2.11.8-JL"
scalaBinaryVersion := "2.11"
scalaBinaryVersion in Test := "2.11"

When I compile, I get these SBT errors below.

Are there more settings to change when using 'scalaBinaryVersion := "2.11"' ?

I just want to have a good recipe in case I hit an other compiler crash ;)

Many thanks!

JL


info] Resolving net.contentobjects.jnotify#jnotify;0.94-play-1 ...
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     ::          UNRESOLVED DEPENDENCIES         ::
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     :: org.scala-lang#scala-library;2.11.8-JL: configuration not found in org.scala-lang#scala-library;2.11.8-JL: 'default'. It was required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
[warn]     :: org.scala-lang#scala-compiler;2.11.8-JL: configuration not found in org.scala-lang#scala-compiler;2.11.8-JL: 'default'. It was required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]     Note: Unresolved dependencies path:
[warn]         org.scala-lang:scala-library:2.11.8-JL ((sbt.Classpaths) Defaults.scala#L1293)
[warn]           +- org.scala-lang.modules:scala-java8-compat_2.11:0.7.0
[warn]           +- com.typesafe.akka:akka-actor_2.11:2.4.12
[warn]           +- com.typesafe.akka:akka-stream_2.11:2.4.12
[warn]           +- com.typesafe.play:play-streams_2.11:2.5.10
[warn]           +- com.typesafe.play:play_2.11:2.5.10
[warn]           +- com.typesafe.play:play-server_2.11:2.5.10 ((play.sbt.PlaySettings) PlaySettings.scala#L55)
[warn]           +- com.typesafe.play:play-netty-server_2.11:2.5.10 ((play.sbt.PlayNettyServer) Play.scala#L68)
[warn]           +- com.typesafe.play:play-docs_2.11:2.5.10
[warn]           +- com.typesafe.play:play-omnidoc_2.11:2.5.10 ((play.sbt.PlaySettings) PlaySettings.scala#L69)
[warn]           +- ws-test:ws-test_2.11:1.0-SNAPSHOT
[warn]         org.scala-lang:scala-compiler:2.11.8-JL
[warn]           +- org.scala-lang.modules:scala-pickling_2.11:0.10.0
[warn]           +- org.scala-sbt:serialization_2.11:0.1.0
[warn]           +- com.typesafe.sbtrc:client-2-11:0.3.1
[warn]           +- com.typesafe.play:fork-run-protocol_2.11:2.5.10 ((play.sbt.forkrun.PlayForkRun) PlayForkRun.scala#L48)
[warn]           +- com.typesafe.play:fork-run_2.11:2.5.10 ((play.sbt.forkrun.PlayForkRun) PlayForkRun.scala#L48)
[warn]           +- ws-test:ws-test_2.11:1.0-SNAPSHOT
sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.11.8-JL: configuration not found in org.scala-lang#scala-library;2.11.8-JL: 'default'. It was required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
unresolved dependency: org.scala-lang#scala-compiler;2.11.8-JL: configuration not found in org.scala-lang#scala-compiler;2.11.8-JL: 'default'. It was required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
    at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
    at xsbt.boot.Using$.withResource(Using.scala:10)
    at xsbt.boot.Using$.apply(Using.scala:9)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
    at sbt.IvySbt.withIvy(Ivy.scala:128)
    at sbt.IvySbt.withIvy(Ivy.scala:125)
    at sbt.IvySbt$Module.withModule(Ivy.scala:156)
    at sbt.IvyActions$.updateEither(IvyActions.scala:168)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1481)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1477)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1512)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1510)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1515)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1509)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1532)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1459)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1411)


    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] (*:update) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.11.8-JL: configuration not found in org.scala-lang#scala-library;2.11.8-JL: 'default'. It was required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
[error] unresolved dependency: org.scala-lang#scala-compiler;2.11.8-JL: configuration not found in org.scala-lang#scala-compiler;2.11.8-JL: 'default'. It was required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool



Le 2016-11-22 à 16:14, Seth Tisue a écrit :

Adriaan Moors

unread,
Nov 28, 2016, 12:56:38 PM11/28/16
to scala-i...@googlegroups.com
Interesting. Sounds like you hit a problem with publishing your scala build locally. Could you try with a new version number in case some metadata in your local ivy repo was corrupted?

Another explanation could be that our 2.11 build definition is not yet up to date with 2.12's, where sbt is actually used (2.11 is still officially built with ant).

You don't have to use baseVersionSuffix, by the way, it's fine to set the full version directly as normal in sbt.

Cheers
Adriaan

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.

Jacques Lemieux

unread,
Nov 28, 2016, 1:21:29 PM11/28/16
to scala-i...@googlegroups.com

In the build.sbt file of the scala compiler, I did put:

version := "2.11.8-abc"
globalVersionSettings


baseVersion in Global := "2.11.8"

baseVersionSuffix in Global := "abc"

Note that not using/setting the variables globalVersionSettings, baseVersion and baseVersionSuffix results in fatal errors at SBT startup. All of them need to be specified.

Then I used :

scalaVersion := "2.11.8-abc"
scalaVersion in Test := "2.11.8-abc"


scalaBinaryVersion := "2.11"
scalaBinaryVersion in Test := "2.11"

in my own project build.sbt file.

When I compile I get the same errors as before (see just below).

It would be interesting a have a documented recipe to build a local 2.11.8 scala compiler that we could use in our own projects, notably to help debug the kind of compiler crash I had.

Thank you!

JL

=================

[info] Updating {file:/home/jacques/Documents/Projects/ActorDemo/}root...
[info] Resolving com.fasterxml.jackson.datatype#jackson-datatype-jsr310;2.7.8 ..[info] Resolving org.eclipse.jetty.websocket#websocket-client;9.2.15.v20160210 .[info] Resolving org.eclipse.jetty.websocket#websocket-common;9.2.15.v20160210 .[info] Resolving net.contentobjects.jnotify#jnotify;0.94-play-1 ...


[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     ::          UNRESOLVED DEPENDENCIES         ::
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::

[warn]     :: org.scala-lang#scala-library;2.11.8-abc: configuration not found in org.scala-lang#scala-library;2.11.8-abc: 'default'. It was required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
[warn]     :: org.scala-lang#scala-compiler;2.11.8-abc: configuration not found in org.scala-lang#scala-compiler;2.11.8-abc: 'default'. It was required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool


[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]     Note: Unresolved dependencies path:

[warn]         org.scala-lang:scala-library:2.11.8-abc ((org.ensime.EnsimePlugin) EnsimePlugin.scala#L191)
[warn]           +- org.scala-lang.modules:scala-parser-combinators_2.11:1.0.4
[warn]           +- com.typesafe:ssl-config-core_2.11:0.2.1


[warn]           +- com.typesafe.akka:akka-stream_2.11:2.4.12
[warn]           +- com.typesafe.play:play-streams_2.11:2.5.10
[warn]           +- com.typesafe.play:play_2.11:2.5.10
[warn]           +- com.typesafe.play:play-server_2.11:2.5.10 ((play.sbt.PlaySettings) PlaySettings.scala#L55)
[warn]           +- com.typesafe.play:play-netty-server_2.11:2.5.10 ((play.sbt.PlayNettyServer) Play.scala#L68)
[warn]           +- com.typesafe.play:play-docs_2.11:2.5.10
[warn]           +- com.typesafe.play:play-omnidoc_2.11:2.5.10 ((play.sbt.PlaySettings) PlaySettings.scala#L69)
[warn]           +- ws-test:ws-test_2.11:1.0-SNAPSHOT

[warn]         org.scala-lang:scala-compiler:2.11.8-abc ((org.ensime.EnsimePlugin) EnsimePlugin.scala#L191)


[warn]           +- org.scala-lang.modules:scala-pickling_2.11:0.10.0
[warn]           +- org.scala-sbt:serialization_2.11:0.1.0
[warn]           +- com.typesafe.sbtrc:client-2-11:0.3.1
[warn]           +- com.typesafe.play:fork-run-protocol_2.11:2.5.10 ((play.sbt.forkrun.PlayForkRun) PlayForkRun.scala#L48)
[warn]           +- com.typesafe.play:fork-run_2.11:2.5.10 ((play.sbt.forkrun.PlayForkRun) PlayForkRun.scala#L48)
[warn]           +- ws-test:ws-test_2.11:1.0-SNAPSHOT

[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.11.8-abc: configuration not found in org.scala-lang#scala-library;2.11.8-abc: 'default'. It was required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
[error] unresolved dependency: org.scala-lang#scala-compiler;2.11.8-abc: configuration not found in org.scala-lang#scala-compiler;2.11.8-abc: 'default'. It was required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool

Adriaan Moors

unread,
Nov 28, 2016, 2:11:43 PM11/28/16
to scala-i...@googlegroups.com
Agreed on having better docs on how to build 2.11 with sbt. Because ant is still official, we haven't invested much in that combo.

For sbt, I don't tend to edit the build file, but just set the version from the shell. Actually, my day to day usage is documented at http://scala-lang.org/contribute/hacker-guide.html#implement: I have the version be derived from the sha of my current tree, and make sure to commit before publishing. 

That said, the ant tasks are modeled after sbt's standard tasks: https://github.com/scala/scala/blob/2.11.x/build.xml#L85
The fastest ant recipe for local publishing of the core is: ant publish-core-local-nodocs -Dmaven.version.suffix="-foo"


hth
adriaan

Stefan Zeiger

unread,
Nov 29, 2016, 5:14:55 AM11/29/16
to scala-i...@googlegroups.com
On 2016-11-28 19:21, Jacques Lemieux wrote:
>
> [warn] :: org.scala-lang#scala-library;2.11.8-abc: configuration
> not found in org.scala-lang#scala-library;2.11.8-abc: 'default'. It
> was required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
>

Is your build based on 2.11.8 or the 2.11.x branch? This looks like the
scope problem which was fixed in
https://github.com/scala/scala/pull/5128 (after 2.11.8).

Reply all
Reply to author
Forward
0 new messages