Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Throws NullPointerException without much other information #19

Open
ChetanBhasin opened this issue Oct 22, 2019 · 4 comments
Open

Throws NullPointerException without much other information #19

ChetanBhasin opened this issue Oct 22, 2019 · 4 comments

Comments

@ChetanBhasin
Copy link

I have been trying to use this plugin in an internal repository, but get a NullPointerException without much context for debugging.
Unfortunately, the code that I'm working with is private to my organisation so I cannot upload the entire thing on Github to help reproduce the issue.

But at the same time, there isn't much given by SBT to debug the issue, and the trace from last also wasn't something I could get my head around.

Here is the stack trace from sbt last:

[error]         at sbt.nio.Settings$.maybeAddOutputsAndFileStamps(Settings.scala:57)
[error]         at sbt.nio.Settings$.$anonfun$inject$1(Settings.scala:36)
[error]         at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:245)
[error]         at scala.collection.immutable.List.foreach(List.scala:392)
[error]         at scala.collection.TraversableLike.flatMap(TraversableLike.scala:245)
[error]         at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:242)
[error]         at scala.collection.immutable.List.flatMap(List.scala:355)
[error]         at sbt.nio.Settings$.inject(Settings.scala:34)
[error]         at sbt.internal.Load$.transformSettings(Load.scala:412)
[error]         at sbt.internal.Load$.$anonfun$buildConfigurations$2(Load.scala:388)
[error]         at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:245)
[error]         at scala.collection.MapLike$MappedValues.$anonfun$foreach$3(MapLike.scala:256)
[error]         at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:877)
[error]         at scala.collection.immutable.Map$Map2.foreach(Map.scala:159)
[error]         at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:876)
[error]         at scala.collection.MapLike$MappedValues.foreach(MapLike.scala:256)
[error]         at scala.collection.TraversableLike.flatMap(TraversableLike.scala:245)
[error]         at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:242)
[error]         at scala.collection.AbstractTraversable.flatMap(Traversable.scala:108)
[error]         at sbt.internal.Load$.$anonfun$buildConfigurations$1(Load.scala:378)
[error]         at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:245)
[error]         at scala.collection.Iterator.foreach(Iterator.scala:941)
[error]         at scala.collection.Iterator.foreach$(Iterator.scala:941)
[error]         at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
[error]         at scala.collection.IterableLike.foreach(IterableLike.scala:74)
[error]         at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
[error]         at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
[error]         at scala.collection.TraversableLike.flatMap(TraversableLike.scala:245)
[error]         at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:242)
[error]         at scala.collection.AbstractTraversable.flatMap(Traversable.scala:108)
[error]         at sbt.internal.Load$.buildConfigurations(Load.scala:375)
[error]         at sbt.internal.Load$.$anonfun$apply$3(Load.scala:250)
[error]         at sbt.internal.Load$.timed(Load.scala:1390)
[error]         at sbt.internal.Load$.apply(Load.scala:250)
[error]         at sbt.internal.Load$.defaultLoad(Load.scala:55)
[error]         at sbt.BuiltinCommands$.liftedTree1$1(Main.scala:839)
[error]         at sbt.BuiltinCommands$.doLoadProject(Main.scala:839)
[error]         at sbt.BuiltinCommands$.$anonfun$loadProjectImpl$2(Main.scala:801)
[error]         at sbt.Command$.$anonfun$applyEffect$4(Command.scala:149)
[error]         at sbt.Command$.$anonfun$applyEffect$2(Command.scala:144)
[error]         at sbt.Command$.process(Command.scala:187)
[error]         at sbt.MainLoop$.process$1(MainLoop.scala:185)
[error]         at sbt.MainLoop$.processCommand(MainLoop.scala:220)
[error]         at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:142)
[error]         at sbt.State$StateOpsImpl$.runCmd$1(State.scala:273)
[error]         at sbt.State$StateOpsImpl$.process$extension(State.scala:277)
[error]         at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:142)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error]         at sbt.MainLoop$.next(MainLoop.scala:142)
[error]         at sbt.MainLoop$.run(MainLoop.scala:133)
[error]         at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:111)
[error]         at sbt.io.Using.apply(Using.scala:27)
[error]         at sbt.MainLoop$.runWithNewLog(MainLoop.scala:105)
[error]         at sbt.MainLoop$.runAndClearLast(MainLoop.scala:60)
[error]         at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:45)
[error]         at sbt.MainLoop$.runLogged(MainLoop.scala:36)
[error]         at sbt.StandardMain$.runManaged(Main.scala:132)
[error]         at sbt.xMain$.run(Main.scala:67)
[error]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error]         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error]         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error]         at sbt.internal.XMainConfiguration.run(XMainConfiguration.scala:46)
[error]         at sbt.xMain.run(Main.scala:39)
[error]         at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:111)
[error]         at xsbt.boot.Launch$.withContextLoader(Launch.scala:130)
[error]         at xsbt.boot.Launch$.run(Launch.scala:111)
[error]         at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:37)
[error]         at xsbt.boot.Launch$.launch(Launch.scala:119)
[error]         at xsbt.boot.Launch$.apply(Launch.scala:20)
[error]         at xsbt.boot.Boot$.runImpl(Boot.scala:56)
[error]         at xsbt.boot.Boot$.main(Boot.scala:18)
[error]         at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.NullPointerException
[error] Use 'last' for the full log.
[debug] > Exec(loadFailed, None, None)
[debug] > Exec(last, None, None)

I'm not sure what other information I can provide to help debug, but I'm happy to follow along and give any more information that I can.

@jsoref
Copy link

jsoref commented Oct 25, 2019

This seems to be caused by changing from sbt 1.2.8 to sbt 1.3.x

(At least, switching from 1.3.3 to 1.2.8 gives me a different error.)

@eatkins
Copy link

eatkins commented Oct 25, 2019

See sbt/sbt#5215. The NPE could probably be fixed in sbt-bazel by making Expr[Source] a concrete type. It is effectively a higher-kinded type due to type Expr[V] = Mu[ExprF[V, ?]]. The plugin arguably should not have compiled for any version of sbt because it is not possible to make a Manifest[Expr[Source]] or Manifest[BazelDsl].

@akter-pi
Copy link

If i add addSbtPlugin("com.stripe" % "sbt-bazel" % "0.0.1") in project/plugins.sbt

this java.lang.NullPointerException shows to me

@andyscott
Copy link
Collaborator

Thanks for filing an issue!

We are no longer using or maintaining this plugin.

I'll be archiving the repository shortly to ensure there's no confusion regarding support.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants