These are chat archives for sbt/sbt

30th
Jan 2017
Alexa DeWit
@AlexaDeWit
Jan 30 08:23
I don't know if maybe I'm doing something suuuper dumb right now, but I have a project lets call it foo, with a root package foopack. I am trying to reference foopack inside my build.sbt and thus write a task using a function in it. The problem is I'm getting back that the value foopack is not found. Is there something that's going right over my head, or any idea what direction I should look in?
Otto Chrons
@ochrons
Jan 30 08:44
put your support code in the project directory, then SBT can find and use it
Alexa DeWit
@AlexaDeWit
Jan 30 08:49
@ochrons how do I provide external dependencies to project code?
Travis
@travissarles
Jan 30 15:27
What version of Scala should "sbt console" use? Should it pull down the latest unless you specify a Scala version like so: --version=2.11.1
Paul Draper
@pauldraper
Jan 30 15:28
It will use scalaVersion, which is by default 2.10
Travis
@travissarles
Jan 30 15:28
*what version of Scala should "sbt console" use if you're outside of a project
Paul Draper
@pauldraper
Jan 30 15:29
You'll never be outside a project; you might just be in the root project.
David Pennell
@dpennell
Jan 30 16:11
using sbt 13.13; I have concurrentRestrictions in Global += Tags.limit(Tags.Test, 1) at root level project; show concurrentRestrictions shows that it propagated to all subprojects. Test cases still generating interleaved output (across subprojects).
Perry
@pfn
Jan 30 16:18
it doesn't restrict concurrency across projects, in all likelihood
just within a project
Matt Hicks
@darkfrog26
Jan 30 16:45
hey guys, I want to depend on a module at compile-time only (for use within a Macro), but I don't want the dependency at runtime. Is there any way to define that in SBT?
Matt Hicks
@darkfrog26
Jan 30 16:51
would it just be .dependsOn(stream % "compile")?
Perry
@pfn
Jan 30 16:54
"compile-internal"
Matt Hicks
@darkfrog26
Jan 30 16:54
@pfn ah, thanks!
Perry
@pfn
Jan 30 17:31
ugh, here's an interesting conundrum of removing <<=
how do I do run := (run in whatever).value
with <<=, I just do run <<= run in whatever
Rob Norris
@tpolecat
Jan 30 19:29
Can anyone offer any updated information on sbt-server?
I read @eed3si9n's post from last year but couldn't find anything else.
I admit that I didn't try very hard. Would be out of character.
Perry
@pfn
Jan 30 19:32
maybe something is shipping in 1.0
probably unchanged from that blog post
G. Richard Bellamy
@rbellamy
Jan 30 19:49
In my build.sbt I have a filter def unitTestFilter(name: String): Boolean = (name endsWith "Spec") && !itTestFilter(name) which is then wired up like so testOptions in Test := Seq(Tests.Filter(unitTestFilter))
could this be interfering with my ability to use sbt testOnly **.SomeSpec
Perry
@pfn
Jan 30 19:50
maybe, try removing it and see
G. Richard Bellamy
@rbellamy
Jan 30 19:50
the reason I ask is that what happens right now is that the testOnly task runs ALL the tests, rather than the one I pass in at the command line...
heh @pfn
nope
testOnly: "Executes the tests provided as arguments or all tests if no arguments are provided."
so it's like the argument is being ignored
G. Richard Bellamy
@rbellamy
Jan 30 19:57
jeez
sbt testOnly **.SomeSpec does NOT work, but sbt "testOnly **.SomeSpec" DOES
Perry
@pfn
Jan 30 20:50
yes, that should have been obvious
arguments to commands must be quoted
Alexandre Archambault
@alexarchambault
Jan 30 21:26
Does sbt somehow parallelize task evaluations? I'm running into frequent random failures in the tests of a plugin of mine, but only on single core machines it seems :-) In particular, upon failure, a task doesn't see the right value of another one.
Is this kind of things somehow expected?
Perry
@pfn
Jan 30 22:26
@alexarchambault, tasks in sbt are parallel as long as their dependency graph allows it
Paul Phillips
@paulp
Jan 30 22:26
@alexarchambault The one is supposed to depend on the other.
You can parallelExecution := false if you aren't into it.