You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 15, 2020. It is now read-only.
I'm getting a compile time NPE when using export-hook.
I'm working on a minimal project that reproduces the issue, but it has so far proven frustrating. In the meantime, here's the repository that's causing the issue. Compiling the core project will cause the exception.
The problem seems to go away when I require sbt version 0.13.9 (as opposed to 0.13.7, where the issue occurs).
Here's the NPE's stack trace. @milessabin pointed out here that it doesn't actually involve export-hook, but it only occurs when I add the @export.exports annotation.
java.lang.NullPointerException
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser$$anonfun$1.isDefinedAt(Dependency.scala:142)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser$$anonfun$1.isDefinedAt(Dependency.scala:141)
at xsbt.Dependency$CollectTypeTraverser.traverse(Dependency.scala:89)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser.traverse(Dependency.scala:144)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser.traverse(Dependency.scala:104)
at scala.reflect.api.Trees$Traverser.traverseTypeAscription(Trees.scala:2478)
at scala.reflect.internal.Trees$$anonfun$traverseMemberDef$1$1.apply$mcV$sp(Trees.scala:1214)
at scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
at scala.reflect.internal.Trees$class.traverseMemberDef$1(Trees.scala:1203)
at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1328)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser.traverse(Dependency.scala:153)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser.traverse(Dependency.scala:104)
at scala.reflect.api.Trees$Traverser.traverseTrees(Trees.scala:2484)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser.traverse(Dependency.scala:148)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser.traverse(Dependency.scala:104)
at scala.reflect.internal.Trees$$anonfun$traverseMemberDef$1$1.apply$mcV$sp(Trees.scala:1208)
at scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
at scala.reflect.internal.Trees$class.traverseMemberDef$1(Trees.scala:1203)
at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1327)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser.traverse(Dependency.scala:153)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser.traverse(Dependency.scala:104)
at scala.reflect.api.Trees$Traverser.traverseTrees(Trees.scala:2484)
at scala.reflect.internal.Trees$class.traverseComponents$1(Trees.scala:1284)
at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1330)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser.traverse(Dependency.scala:153)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser.traverse(Dependency.scala:150)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser.traverse(Dependency.scala:104)
at scala.reflect.api.Trees$Traverser$$anonfun$traverseStats$1$$anonfun$apply$1.apply$mcV$sp(Trees.scala:2498)
at scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
at scala.reflect.api.Trees$Traverser.traverseStats(Trees.scala:2497)
at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1326)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
at xsbt.Dependency$ExtractDependenciesByMemberRefTraverser.traverse(Dependency.scala:153)
at xsbt.Dependency.xsbt$Dependency$$extractDependenciesByMemberRef(Dependency.scala:159)
at xsbt.Dependency$DependencyPhase$$anonfun$run$2.apply(Dependency.scala:42)
at xsbt.Dependency$DependencyPhase$$anonfun$run$2.apply(Dependency.scala:38)
at scala.collection.Iterator$class.foreach(Iterator.scala:742)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
at xsbt.Dependency$DependencyPhase.run(Dependency.scala:38)
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:497)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:97)
at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:97)
at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:97)
at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:162)
at sbt.compiler.AggressiveCompile$$anonfun$3.compileScala$1(AggressiveCompile.scala:96)
at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:139)
at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:86)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:38)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:36)
at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:31)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:39)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:38)
at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:66)
at sbt.inc.Incremental$.compile(Incremental.scala:38)
at sbt.inc.IncrementalCompile$.apply(Compile.scala:26)
at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:153)
at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:70)
at sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:45)
at sbt.Compiler$.apply(Compiler.scala:74)
at sbt.Compiler$.apply(Compiler.scala:65)
at sbt.Defaults$.sbt$Defaults$$compileTaskImpl(Defaults.scala:789)
at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:781)
at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:781)
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:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
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] (core/compile:compile) java.lang.NullPointerException
The text was updated successfully, but these errors were encountered:
I'm getting a compile time NPE when using
export-hook
.I'm working on a minimal project that reproduces the issue, but it has so far proven frustrating. In the meantime, here's the repository that's causing the issue. Compiling the
core
project will cause the exception.The problem seems to go away when I require sbt version 0.13.9 (as opposed to 0.13.7, where the issue occurs).
Here's the NPE's stack trace.
@milessabin pointed out here that it doesn't actually involve
export-hook
, but it only occurs when I add the@export.exports
annotation.The text was updated successfully, but these errors were encountered: