question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`Position.point on NoPosition` while compiling sbt 1.0.0-SNAPSHOT with sbt 1.0.0-M6

See original GitHub issue

I’m trying to port sbt/sbt to the new library management API, but I get an exception while compiling mainProj. Here are the versions I use:

  private val ioVersion = "1.0.0-M12"
  private val utilVersion = "1.0.0-M26"
  private val lmVersion = "1.0.0-SNAPSHOT" // (sbt/librarymanagement#124, 74f6a492de82873d925dd4581efe229d2b1f9d30)
  private val zincVersion = "1.0.0-X16-SNAPSHOT" // (sbt/zinc#335, e6d97c34b119670d116df6e4850674ab05c5ca24x)

steps

problem

The following exception is thrown during compilation:

[error] ## Exception when compiling 77 sources to /Users/martin/Documents/Projects.nosync/Duhemm/sbt/main/target/scala-2.12/classes
[error] Position.point on NoPosition
[error] scala.reflect.internal.util.Position.fail(Position.scala:17)
[error] scala.reflect.internal.util.UndefinedPosition.point(Position.scala:95)
[error] scala.reflect.internal.util.UndefinedPosition.point(Position.scala:90)
[error] scala.tools.nsc.typechecker.TypeDiagnostics$TyperDiagnostics$checkUnused$UnusedPrivates.$anonfun$unusedTerms$4(TypeDiagnostics.scala:593)
[error] scala.tools.nsc.typechecker.TypeDiagnostics$TyperDiagnostics$checkUnused$UnusedPrivates.$anonfun$unusedTerms$4$adapted(TypeDiagnostics.scala:593)
[error] scala.collection.Iterator.exists(Iterator.scala:955)
[error] scala.collection.Iterator.exists$(Iterator.scala:953)
[error] scala.collection.AbstractIterator.exists(Iterator.scala:1417)
[error] scala.collection.IterableLike.exists(IterableLike.scala:76)
[error] scala.collection.IterableLike.exists$(IterableLike.scala:75)
[error] scala.collection.AbstractIterable.exists(Iterable.scala:54)
[error] scala.tools.nsc.typechecker.TypeDiagnostics$TyperDiagnostics$checkUnused$UnusedPrivates.$anonfun$unusedTerms$2(TypeDiagnostics.scala:593)
[error] scala.tools.nsc.typechecker.TypeDiagnostics$TyperDiagnostics$checkUnused$UnusedPrivates.$anonfun$unusedTerms$2$adapted(TypeDiagnostics.scala:591)
[error] scala.collection.TraversableLike.$anonfun$filterImpl$1(TraversableLike.scala:248)
[error] scala.collection.immutable.List.foreach(List.scala:389)
[error] scala.collection.TraversableLike.filterImpl(TraversableLike.scala:247)
[error] scala.collection.TraversableLike.filterImpl$(TraversableLike.scala:245)
[error] scala.collection.AbstractTraversable.filterImpl(Traversable.scala:104)
[error] scala.collection.TraversableLike.filterNot(TraversableLike.scala:267)
[error] scala.collection.TraversableLike.filterNot$(TraversableLike.scala:267)
[error] scala.collection.AbstractTraversable.filterNot(Traversable.scala:104)
[error] scala.tools.nsc.typechecker.TypeDiagnostics$TyperDiagnostics$checkUnused$UnusedPrivates.unusedTerms(TypeDiagnostics.scala:591)
[error] scala.tools.nsc.typechecker.TypeDiagnostics$TyperDiagnostics$checkUnused$.apply(TypeDiagnostics.scala:613)
[error] scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:108)
[error] scala.tools.nsc.Global$GlobalPhase.$anonfun$applyPhase$1(Global.scala:423)
[error] scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:416)
[error] scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.$anonfun$run$1(Analyzer.scala:94)
[error] scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.$anonfun$run$1$adapted(Analyzer.scala:93)
[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.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93)
[error] scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1427)
[error] scala.tools.nsc.Global$Run.compileUnits(Global.scala:1412)
[error] scala.tools.nsc.Global$Run.compileSources(Global.scala:1407)
[error] scala.tools.nsc.Global$Run.compile(Global.scala:1501)
[error] xsbt.CachedCompiler0.run(CompilerInterface.scala:135)
[error] xsbt.CachedCompiler0.run(CompilerInterface.scala:110)
[error] xsbt.CompilerInterface.run(CompilerInterface.scala:33)
[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:239)
[error] sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:109)
[error] sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:88)
[error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$3(MixedAnalyzingCompiler.scala:81)
[error] scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:132)
[error] sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:72)
[error] sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:115)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:304)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:304)
[error] sbt.internal.inc.Incremental$.doCompile(Incremental.scala:101)
[error] sbt.internal.inc.Incremental$.$anonfun$compile$4(Incremental.scala:82)
[error] sbt.internal.inc.IncrementalCommon.recompileClasses(IncrementalCommon.scala:118)
[error] sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:64)
[error] sbt.internal.inc.Incremental$.$anonfun$compile$3(Incremental.scala:84)
[error] sbt.internal.inc.Incremental$.manageClassfiles(Incremental.scala:129)
[error] sbt.internal.inc.Incremental$.compile(Incremental.scala:75)
[error] sbt.internal.inc.IncrementalCompile$.apply(Compile.scala:70)
[error] sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:308)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:266)
[error] sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:157)
[error] sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:236)
[error] sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:67)
[error] sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:1385)
[error] sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:1367)
[error] scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] sbt.std.Transform$$anon$4.work(System.scala:64)
[error] sbt.Execute.$anonfun$submit$2(Execute.scala:257)
[error] sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
[error] sbt.Execute.work(Execute.scala:266)
[error] sbt.Execute.$anonfun$submit$1(Execute.scala:257)
[error] sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167)
[error] sbt.CompletionService$$anon$2.call(CompletionService.scala:32)
[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:1142)
[error] java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error] java.lang.Thread.run(Thread.java:745)
[error]

expectation

  • Compilation errors, but no exception

notes

The exception is buried deep down in scalac, so maybe sbt isn’t the culprit?

No plugins:

In file:/Users/martin/Documents/Projects.nosync/Duhemm/sbt/
        sbt.plugins.IvyPlugin: enabled in testingProj, sbtRoot, protocolProj, scriptedSbtProj, stdTaskProj, sbtProj, taskProj, runProj, bundledLauncherProj, mainProj, scriptedPluginProj, coreMacrosProj, mainSettingsProj, actionsProj, commandProj, testAgentProj
        sbt.plugins.JvmPlugin: enabled in testingProj, sbtRoot, protocolProj, scriptedSbtProj, stdTaskProj, sbtProj, taskProj, runProj, bundledLauncherProj, mainProj, scriptedPluginProj, coreMacrosProj, mainSettingsProj, actionsProj, commandProj, testAgentProj
        sbt.plugins.CorePlugin: enabled in testingProj, sbtRoot, protocolProj, scriptedSbtProj, stdTaskProj, sbtProj, taskProj, runProj, bundledLauncherProj, mainProj, scriptedPluginProj, coreMacrosProj, mainSettingsProj, actionsProj, commandProj, testAgentProj
        sbt.plugins.JUnitXmlReportPlugin: enabled in testingProj, sbtRoot, protocolProj, scriptedSbtProj, stdTaskProj, sbtProj, taskProj, runProj, bundledLauncherProj, mainProj, scriptedPluginProj, coreMacrosProj, mainSettingsProj, actionsProj, commandProj, testAgentProj
        sbt.plugins.Giter8TemplatePlugin: enabled in testingProj, sbtRoot, protocolProj, scriptedSbtProj, stdTaskProj, sbtProj, taskProj, runProj, bundledLauncherProj, mainProj, scriptedPluginProj, coreMacrosProj, mainSettingsProj, actionsProj, commandProj, testAgentProj
        bintray.BintrayPlugin: enabled in testingProj, sbtRoot, protocolProj, scriptedSbtProj, stdTaskProj, sbtProj, taskProj, runProj, bundledLauncherProj, mainProj, scriptedPluginProj, coreMacrosProj, mainSettingsProj, actionsProj, commandProj, testAgentProj
        sbt.contraband.ContrabandPlugin: enabled in testingProj, protocolProj, runProj, mainProj, commandProj
        sbt.contraband.JsonCodecPlugin: enabled in testingProj, protocolProj, commandProj
        com.typesafe.sbt.SbtPgp: enabled in testingProj, sbtRoot, protocolProj, scriptedSbtProj, stdTaskProj, sbtProj, taskProj, runProj, bundledLauncherProj, mainProj, scriptedPluginProj, coreMacrosProj, mainSettingsProj, actionsProj, commandProj, testAgentProj
        com.lucidchart.sbt.scalafmt.ScalafmtCorePlugin: enabled in testingProj, sbtRoot, protocolProj, scriptedSbtProj, stdTaskProj, sbtProj, taskProj, runProj, bundledLauncherProj, mainProj, scriptedPluginProj, coreMacrosProj, mainSettingsProj, actionsProj, commandProj, testAgentProj
        com.lucidchart.sbt.scalafmt.ScalafmtPlugin: enabled in testingProj, sbtRoot, protocolProj, scriptedSbtProj, stdTaskProj, sbtProj, taskProj, runProj, bundledLauncherProj, mainProj, scriptedPluginProj, coreMacrosProj, mainSettingsProj, actionsProj, commandProj, testAgentProj
        PublishBinPlugin: enabled in testingProj, sbtRoot, protocolProj, scriptedSbtProj, stdTaskProj, sbtProj, taskProj, runProj, bundledLauncherProj, mainProj, scriptedPluginProj, coreMacrosProj, mainSettingsProj, actionsProj, commandProj, testAgentProj
        ScriptedPlugin: enabled in sbtRoot
        NightlyPlugin: enabled in testingProj, sbtRoot, protocolProj, scriptedSbtProj, stdTaskProj, sbtProj, taskProj, runProj, bundledLauncherProj, mainProj, scriptedPluginProj, coreMacrosProj, mainSettingsProj, actionsProj, commandProj, testAgentProj
        SbtLauncherPlugin: enabled in bundledLauncherProj
        StatusPlugin: enabled in testingProj, sbtRoot, protocolProj, scriptedSbtProj, stdTaskProj, sbtProj, taskProj, runProj, bundledLauncherProj, mainProj, scriptedPluginProj, coreMacrosProj, mainSettingsProj, actionsProj, commandProj, testAgentProj

sbt version: 1.0.0-M6 cleaning doesn’t solve the issue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
lrytzcommented, Jul 27, 2017
1reaction
Duhemmcommented, Jul 13, 2017

@dwijnand It could very well be. This can be closed anyway, as this is a scalac bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sbt Reference Manual — Combined Pages
Running sbt with no command line arguments starts sbt shell. sbt shell has a command prompt (with tab completion and history!). For example,...
Read more >
IntelliJ IDEA 2018.3 scala 2.12 sbt 1.0 assembly unresolved ...
Here are my details, but I get unresolved dependencies issue with SSLHandshakeException. chose the following while setting up project sbt ...
Read more >
sbt-release - Scaladex
This sbt plugin provides a customizable release process that you can add to your project. ... release release-version 1.0.99 next-version 1.2.0-SNAPSHOT ...
Read more >
SBT Examples - GitHub Pages
sbt run - compiles any scala files in the directory. ... sbt package. sbt package - outputs a jar in target to /target/scala-2.12/hello_2.12-1.0.1.jar ......
Read more >
sbt/sbt - Gitter
Good point. ... Why would a library author cross-build with sbt 1.0.0 and 0.13.x? ... compile [info] Setting sbtVersion in pluginCrossBuild to 0.13.16...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found