Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade Scala 2.12.4 -> 2.12.6 #4126

Closed
wants to merge 1 commit into from

Conversation

SethTisue
Copy link
Member

I have no specific user-visible benefit in mind other than fewer
JARs to download for people who are on current versions of things

I have no specific user-visible benefit in mind other than fewer
JARs to download for people who are on current versions of things
@dwijnand
Copy link
Member

Uhhhh... lots and lots of these in CI:

[info] [error] java.lang.NullPointerException
[info] [error] 	at scala.collection.mutable.WrappedArray$ofRef.length(WrappedArray.scala:129)
[info] [error] 	at scala.collection.SeqLike.size(SeqLike.scala:105)
[info] [error] 	at scala.collection.SeqLike.size$(SeqLike.scala:105)
[info] [error] 	at scala.collection.AbstractSeq.size(Seq.scala:41)
[info] [error] 	at scala.collection.TraversableLike.$plus$plus(TraversableLike.scala:145)
[info] [error] 	at scala.collection.TraversableLike.$plus$plus$(TraversableLike.scala:143)
[info] [error] 	at scala.collection.mutable.ArrayOps$ofRef.$plus$plus(ArrayOps.scala:194)
[info] [error] 	at sbt.internal.Load$.defaultPreGlobal(Load.scala:85)
[info] [error] 	at sbt.internal.Load$.$anonfun$defaultLoad$1(Load.scala:63)
[info] [error] 	at sbt.internal.Load$.timed(Load.scala:1357)
[info] [error] 	at sbt.internal.Load$.defaultLoad(Load.scala:60)
[info] [error] 	at sbt.BuiltinCommands$.liftedTree1$1(Main.scala:744)
[info] [error] 	at sbt.BuiltinCommands$.doLoadProject(Main.scala:744)
[info] [error] 	at sbt.BuiltinCommands$.$anonfun$loadProjectImpl$2(Main.scala:715)
[info] [error] 	at sbt.Command$.$anonfun$applyEffect$4(Command.scala:142)
[info] [error] 	at sbt.Command$.$anonfun$applyEffect$2(Command.scala:137)
[info] [error] 	at sbt.Command$.process(Command.scala:181)
[info] [error] 	at sbt.MainLoop$.processCommand(MainLoop.scala:151)
[info] [error] 	at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:139)
[info] [error] 	at sbt.State$$anon$1.runCmd$1(State.scala:246)
[info] [error] 	at sbt.State$$anon$1.process(State.scala:250)
[info] [error] 	at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:139)
[info] [error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[info] [error] 	at sbt.MainLoop$.next(MainLoop.scala:139)
[info] [error] 	at sbt.MainLoop$.run(MainLoop.scala:132)
[info] [error] 	at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:110)
[info] [error] 	at sbt.io.Using.apply(Using.scala:22)
[info] [error] 	at sbt.MainLoop$.runWithNewLog(MainLoop.scala:104)
[info] [error] 	at sbt.MainLoop$.runAndClearLast(MainLoop.scala:59)
[info] [error] 	at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:44)
[info] [error] 	at sbt.MainLoop$.runLogged(MainLoop.scala:35)
[info] [error] 	at sbt.StandardMain$.runManaged(Main.scala:112)
[info] [error] 	at sbt.xMain.run(Main.scala:74)
[info] [error] 	at sbt.RunFromSourceMain$.launch(RunFromSourceMain.scala:39)
[info] [error] 	at sbt.RunFromSourceMain$.runImpl(RunFromSourceMain.scala:32)
[info] [error] 	at sbt.RunFromSourceMain$.run(RunFromSourceMain.scala:26)
[info] [error] 	at sbt.RunFromSourceMain$.main(RunFromSourceMain.scala:20)
[info] [error] 	at sbt.RunFromSourceMain.main(RunFromSourceMain.scala)
[info] [error] java.lang.NullPointerException

mayday, mayday?

@SethTisue
Copy link
Member Author

maybe one of the 2.12.4's I changed to 2.12.6 actually needs to be 2.12.4 because it has to match the version of sbt that's building the code, something like that?

the NPE can come from:

scala> null: collection.mutable.WrappedArray[Int]
res8: scala.collection.mutable.WrappedArray[Int] = null

scala> res8.size
java.lang.NullPointerException

means there's some null coming from some indeterminate earlier point in time, looks hairy to investigate.

this PR was really more a reminder than something I intended to personally pursue, and the likelihood of this being caused by an actual regression in 2.12.5 or 2.12.6 seems fairly low to me.

@eed3si9n
Copy link
Member

This is a bug of RunFromSourceMain.scala I think. See https://github.com/sbt/sbt/blob/1.x/sbt/src/test/scala/sbt/RunFromSourceMain.scala#L50-L56

  private def getConf(baseDir: File, args: Seq[String]): AppConfiguration = new AppConfiguration {
    def baseDirectory = baseDir
    def arguments = args.toArray
    def provider = new AppProvider { appProvider =>
      def bootDirectory: File = file(sys.props("user.home")) / ".sbt" / "boot"
      def scalaHome: File = bootDirectory / s"scala-$scalaVersion"
      def scalaProvider = new ScalaProvider { scalaProvider =>

the new scripted test uses sbtOn mechanism that no longer requires local publishing of sbt artifacts. It still needs to resolve the location of scala-compiler and scala-library JAR. It assumes that they are available in bootDirectory / s"scala-$scalaVersion". But this assumption does not hold when sbt doesn't yet use the patch release of Scala.
The workaround would be to manually resolve Scala using Ivy (like Launcher is doing internally) or call Launcher as a function.

@eed3si9n
Copy link
Member

Closing this in favor of #4129

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

Successfully merging this pull request may close these issues.

3 participants