These are chat archives for sbt/sbt

17th
Apr 2017
Sam Halliday
@fommil
Apr 17 10:37
+1 that'd be nice
does anybody know how to set something for all projects? set conflictManager := ConflictManager.default doesn't do it
Global doesn't work because it's defined on the project level
nor does ThisBuild
OlegYch
@OlegYch
Apr 17 11:32
try 'set every', not sure about build analog
Dale Wijnand
@dwijnand
Apr 17 11:35
@jastice TaskKey[Int]("foo") := 1
@fommil commonSettings or commonSettings-via-local-AutoPlugin
or fix sbt/sbt#2899 :D
Justin Kaeser
@jastice
Apr 17 11:37
@dwijnand but then it's not available as variable
Dale Wijnand
@dwijnand
Apr 17 11:38
yeah
you want to create two values in one expression: a TaskKey and a Setting[_]
Justin Kaeser
@jastice
Apr 17 11:38
basically, yes
Dale Wijnand
@dwijnand
Apr 17 11:38
maybe if we solved PatDef in sbt files we would have that
then maybe we could have something funky like
val (foo, setFoo) = taskKeyAndValue(1)
Justin Kaeser
@jastice
Apr 17 11:40
I mean, it's only popped up in my presentation where I thought it was cool to define dozens of tasks, but it seems something that might also be hard for beginners to grok
val foo = task("description") { definition }would be neat. possible at all?
Dale Wijnand
@dwijnand
Apr 17 11:51
maybe. foo would have to be some TaskKeyWithDefaultValue. I know the pain you're talking about. We're always defining keys and giving them values in scripted tests. It's a pain.
Sam Halliday
@fommil
Apr 17 12:57
@jastice awesome! set every worked great
Sam Halliday
@fommil
Apr 17 15:55
hmm, I'm noticing some unusual forking
    concurrentRestrictions := {
      val limited = Properties.envOrElse("SBT_TASK_LIMIT", "4").toInt
      Seq(Tags.limitAll(limited))
    }
if I use SBT_TASK_LIMIT=2 when I do my sbt it:test I'm seeing 3 jvms forked. But I'd expect 2 maximum
there isn't an off by one is there? Or a timing issue?
hmm, this could just be jvisualvm reporting stale entries
Sam Halliday
@fommil
Apr 17 16:30
is there a way to get sbt to spit out which test is being run when a test (forked) is killed by the OS? I have some tests that are causing zombie jvms and can't work out which test is doing it
the default error message is just the classpath
the test group would be ideal
mhzajac
@mhzajac
Apr 17 20:07
Seems like a large chunk (or all) of the sbt binaries on bintray are showing up as 403 forbidden, including download links from the sbt site, like: https://dl.bintray.com/sbt/native-packages/sbt/0.13.15/sbt-0.13.15.zip
eugene yokota
@eed3si9n
Apr 17 20:08
yes. we're currently investigating what's going on with Bintray
mhzajac
@mhzajac
Apr 17 20:08
Alright.
Knut Petter Meen
@kpmeen
Apr 17 20:13
that explains the high frequency of WTF's the last couple of hours
G. Richard Bellamy
@rbellamy
Apr 17 20:53
What's the best way to create a case class for use in an SBT file?
it strikes me as total overkill to have to create an autoplugin
but given that *.scala files are now considered deprecated
eugene yokota
@eed3si9n
Apr 17 20:53
project/Foo.scala isn't deprecated
G. Richard Bellamy
@rbellamy
Apr 17 20:53
aha
nice
eugene yokota
@eed3si9n
Apr 17 20:53
just the Build trait
G. Richard Bellamy
@rbellamy
Apr 17 20:53
thanks @eed3si9n - I hadn't realized that!
of course it is
hence the BuildInfo.scala
rbellamy @rbellamy is slow sometimse
G. Richard Bellamy
@rbellamy
Apr 17 20:54
s/sometimse/sometimes
eugene yokota
@eed3si9n
Apr 17 20:54
it's actually one our FAQ, so probably we're not super clear on that