These are chat archives for sbt/sbt

24th
Apr 2016
Miles Sabin
@milessabin
Apr 24 2016 10:50
How do I run a scripted test in the sbt tree for a Scala 2.12.x based test project? If JAVA_HOME points to a 1.8 JDK I get javac version 1.8.0_51 may not be used to publish, it has to start with 1.6 due to javacVersionPrefix setting, and if JAVA_HOME points to a 1.6 JDK I get java.lang.UnsupportedClassVersionError: scala/tools/nsc/Main : Unsupported major.minor version 52.0.
I can change it to 1.8 in project/Release.scala and everything seems good. Is that the way to go? Is there a preferred alternative?
How have people been testing with 2.12.x?
Dale Wijnand
@dwijnand
Apr 24 2016 11:18
All the current scripted tests don't require 2.12
Miles Sabin
@milessabin
Apr 24 2016 11:28
It's not that they don't require it ... it seems that they're incompatible with it.
Try a test with scalaVersion := "2.12.0-M4".
InTheNow
@InTheNow
Apr 24 2016 11:30
Funnily enough, I'm getting the exact same issue in my local scala community build using the jdk8 branch
InTheNow
@InTheNow
Apr 24 2016 12:16
The only difference I see so far between my build and the "real" that works is that the add the "-Dlocker.skip" to their build, and in their build output there is an extra line [sbt] [warn] bootstrap class path not set in conjunction with -source 1.6 right where my build fails
I've just kicked off a new, clean build with that extra option
That extra settings comes from here , used with scala_build_bootstrap_opt
Dale Wijnand
@dwijnand
Apr 24 2016 12:42
Yeah it's not possible to run scripted tests on JVM 8. Sbt requires 6, because it must verify it works on 6, but that won't work with Scala 2.12.
InTheNow
@InTheNow
Apr 24 2016 12:42
But the community build on jdk8 passes. weird
Ahh - here's why
Dale Wijnand
@dwijnand
Apr 24 2016 12:50
Right but the community build isn't testing sbt
Miles is trying to write a scripted test to fix scalaOrganization but running into this fundamental flaw
InTheNow
@InTheNow
Apr 24 2016 12:52
Sure, I'm just saying I get the exact same error, as the CB builds and publishes sbt
and it is in the release settings where the check is made, not in the tests
InTheNow
@InTheNow
Apr 24 2016 12:57
See this for why it used in publishLocal
Miles Sabin
@milessabin
Apr 24 2016 12:58
I think "fundamental flaw" is a bit strong ;-)
I'd go with "slight infelicity".
InTheNow
@InTheNow
Apr 24 2016 13:09
I'm going with set every javaVersionPrefix in javaVersionCheck := Some(\"1.8\") ;)
Miles Sabin
@milessabin
Apr 24 2016 14:32
How does one get console or log output when attempting to debug SBT? It seems that SBT is clobbering System.out and System.err?
Or is it scripted that's swallowing my output? How can I prevent that?
Miles Sabin
@milessabin
Apr 24 2016 15:10
Hmm ... it looks like scripted will only show output if the test fails?
Can that behaviour be disabled? I've tried scriptedBufferLog := false but that doesn't seem to have any effect.