These are chat archives for sbt/sbt

25th
Feb 2016
Rob Norris
@tpolecat
Feb 25 2016 05:50
Hey is Josh still in charge of plugin linking on bintray? I had to move the location of the tut plugin and noticed that the link message was sent to him. Just wanted to make sure it's not going in a hole.
eugene yokota
@eed3si9n
Feb 25 2016 05:52
@jsuereth should be. if it doesn't work I can ping him etc
Rob Norris
@tpolecat
Feb 25 2016 05:53
Ok, cool. Just didn't know if he was still The Man or not.
eugene yokota
@eed3si9n
Feb 25 2016 05:55
he's the owner of the bintray sbt organization. i'm an admin there, but i guess some messages only go to the owner?
Rob Norris
@tpolecat
Feb 25 2016 05:56
Gotcha. I just didn't know whether he was still involved.
Ben McCann
@benmccann
Feb 25 2016 07:35
There's 3 PRs pending that I need review on or access to merge myself. See https://github.com/sbt/sbt-license-report/pulls
Perry
@pfn
Feb 25 2016 07:36
where has @jsuereth been, anyway, haven't seen him in a while
eugene yokota
@eed3si9n
Feb 25 2016 07:38
@benmccann merged 2 out of 3. the remaining needs a rebase after the first merge
Ben McCann
@benmccann
Feb 25 2016 08:19
@eed3si9n thanks!! i rebased the remaining PR
Johann Petrak
@johann-petrak
Feb 25 2016 11:54
Just starting with sbt -- why does something like addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0") work when added in project/build.sbt but not in ./build.sbt ?
Simon Hafner
@reactormonk
Feb 25 2016 12:02
because that's the meta-project. sbt builds your meta-project, which then builds your project.
if you want to poke around in it, consoleProject and (someValue in Compile).eval
Johann Petrak
@johann-petrak
Feb 25 2016 12:05
thanks ... tbh i find that a bit unintuitive though, like other things in sbt ...
for example when I give in and create that project/build.sbt file just to add my plugin, and then I do "sbt tasks" the task that the plugin makes available is not shown in the list -why? Why can I figure out all the tasks, e.g. when somebody else passes on a sbt configuration that adds plugins which add tasks?
Simon Hafner
@reactormonk
Feb 25 2016 12:11
What other way would you go where you can use scala in your build tool? You'll have to build the scala that describes your build first.
Johann Petrak
@johann-petrak
Feb 25 2016 12:12
or when I realize that the task is missing from the task list, I read at the bottom of sbt's output: "More tasks may be viewed by increasing verbosity. See 'help tasks'" but when I run "sbt help tasks", nothing is shown that would tell me how to increase verbosity, the only line that contains the word verbosity is still the same as before!
From the point of view of a user, all i am interested in is specifying my build - I do not care how sbt does this, but I am sure there would be ways how allow a user to specify it all in a single config file and more importantly: not show surprising behavior. Unless the user knows how sbt works internally, it is surprising behaviour that the same line does something in one ".sbt" file and is ignored (does not produce an error) when included in the main build.sbt file.
Simon Hafner
@reactormonk
Feb 25 2016 12:18
well, actually it's meta-meta (plugins) -> meta (config) -> project
Johann Petrak
@johann-petrak
Feb 25 2016 12:29
right - i can see how that is important for somebody implementing the tool or wanting the modify its behaviour programmatically
Johann Petrak
@johann-petrak
Feb 25 2016 12:34
so if a plugin is then successfully added like this, how can one list the tasks the plugin adds with the sbt tasks or some other command?
Simon Hafner
@reactormonk
Feb 25 2016 12:43
There's probably a better way (I'd like to know too) but I usually look for a Keys object in the plugin sources which has all the keys on it.
Richard Gomes
@frgomes
Feb 25 2016 14:49
When I run a Scala script, which SBT version will be chosen? ... I mean: since there's no project/build.properties... what SBT does in this case?
jeremyrsmith
@jeremyrsmith
Feb 25 2016 15:14
I’m trying to make HTTP GET and PUT requests from within a plugin - when I try to use Ivy’s existing HttpClientHandler, I get java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpMethodBase when the task is executed in a project using the plugin. If I try to bring in "org.apache.httpcomponents" % "httpclient" % “4.5.1” as a libraryDependency, I get a different NoClassDefFoundError when I try to even load a project using the plugin. The plugin builds fine, though.
Is there some issue around using apache HTTP libraries from within a plugin? Some kind of ClassLoader issue?
I also tried explicitly adding "commons-httpclient" % "commons-httpclient" % “3.1” as a libraryDependency for my plugin, but that didn’t help the first issue.
Josh Suereth
@jsuereth
Feb 25 2016 15:25
@tpolecat On it. I've been "oflfine" on Scala in depth lately, and your message came throguh while I had a headcold and just wasn't reading email at all :)
Rob Norris
@tpolecat
Feb 25 2016 15:32
@jsuereth no worries at all man. You updating the book?
Josh Suereth
@jsuereth
Feb 25 2016 15:35
yeah
taking me a long time though, unforutnately
lots less free time these days then when I worked on sbt as part of my day job
Rob Norris
@tpolecat
Feb 25 2016 15:36
cool. will you make it to typelevel and/or nescala next week?
Josh Suereth
@jsuereth
Feb 25 2016 15:36
can't, it actually conflicts with family things.
Rob Norris
@tpolecat
Feb 25 2016 15:37
ah ok.
Perry
@pfn
Feb 25 2016 15:42
ugh, sbt 0. 13.11 breaks the android plugin
Dale Wijnand
@dwijnand
Feb 25 2016 15:43
@pfn sbt/sbt#2476
Perry
@pfn
Feb 25 2016 15:46
yeah, I just started seeing reports of it yesterday
eugene yokota
@eed3si9n
Feb 25 2016 16:12
@pfn sorry about breaking your plugin. do you think you can workaround it on your side?
Perry
@pfn
Feb 25 2016 16:15
I'm. not sure yet, I haven't even tried it on 11
onlynseen reports
Matthew Adams
@matthewadams
Feb 25 2016 16:27
[akka-stream] Hey how can I control or replace the algorithm an akka.stream.scaladsl.Balance junction uses to select which output port it sends elements to? For instance, if I wanted to create a junction that sent even Ints to one output & odd outputs to another?
Perry
@pfn
Feb 25 2016 16:30
try akka/akka-stream?
Matthew Adams
@matthewadams
Feb 25 2016 16:30
oops nvm wrong channel
Perry
@pfn
Feb 25 2016 16:35
@eed3si9n 0.3.11 not tagged in github?
erm, nevermind
prefixed by v
Perry
@pfn
Feb 25 2016 16:41
artifactPath in (Android, packageBin) := apkFile.value workaround for 0.13.11 meh
jeremyrsmith
@jeremyrsmith
Feb 25 2016 16:41
interestingly, if I’m in the project which uses my plugin, and I go into project/ and run sbt dependencyList, all the transitive dependencies of my plugin are listed except for commons-httpclient:commons-httpclient:3.1, which does show up in sbt dependencyList of the plugin itself
Perry
@pfn
Feb 25 2016 16:42
@eed3si9n so what changed that's causing this? I don't quite understand; does something in config scope automatically add publishing settings now or something
Moses Nakamura
@mosesn
Feb 25 2016 16:43
hey, is there a way that I can compile a subproject without pulling in the dependencies I need for tests?
sbt/sbt#2354
Moses Nakamura
@mosesn
Feb 25 2016 16:49
I’m trying to simplify my dependency tree for published artifacts, but still let my tests have the more complicated dependency structure.
Perry
@pfn
Feb 25 2016 16:53
@eed3si9n I see, this was changed in Classpaths.configSettings, hmm
in this case, I guess artifactPath in (Android, packageBin) := (artifactPath in (Compile,packageBin)).value is a better workaround
Shane Delmore
@ShaneDelmore
Feb 25 2016 17:45
Does sbt have any ability to upgrade itself? I am on 13.9 (installed using brew install sbt instructions from the docs) and when I do a brew update and brew upgrade sbt it says 13.9 is the latest. Seems I am back two versions and I wanted to try out 13.11.
Erik LaBianca
@easel
Feb 25 2016 17:47
Just put sbt.version=0.13.11 in project/build.properties
The launcher tends to stay compatible for at least a few releases.
Shane Delmore
@ShaneDelmore
Feb 25 2016 17:48
Easy. So when I just open sbt from random folder I will still get 13.9 right, but if I am in a project folder I will really have 13.11?
Erik LaBianca
@easel
Feb 25 2016 17:48
correct.
Shane Delmore
@ShaneDelmore
Feb 25 2016 17:48
Nice. Thanks.
Perry
@pfn
Feb 25 2016 17:48
more like the launcher is compatible for all of the .x releases, practically
Erik LaBianca
@easel
Feb 25 2016 17:48
practically
In self.myexperience, practically != always in this case.
Perry
@pfn
Feb 25 2016 17:49
I've been using an sbt 0.13.0 launcher for ages
only reason I updated was because I reinstalled my pc apps
Erik LaBianca
@easel
Feb 25 2016 17:49
I had wierd ivy resolution issues using 0.13.5 launcher with 0.13.7 or something like that.
I was also using a private repo though, I think they changed some of the default repositories or something.
In other sbt news, has anyone else seen different dependency resolutions happening when using “standard” sbt resolutino compared to cached or coursier? I dug myself into a pretty deep hole the other day chasing some binary incompability issues that only surfaced with coursier / cached resolution — I assume some submodule was building against an “old” dependency that was getting overridden with the standard method but I haven’t chased it down yet.
Gergő Törcsvári
@tg44
Feb 25 2016 17:52
parallelExecution in Test := false is working?
my tests are failing because they writing the same table at the same time despite I turned paralell exec off, and I clean my db before every test
Erik LaBianca
@easel
Feb 25 2016 17:56
Are they in the same submodule?
Gergő Törcsvári
@tg44
Feb 25 2016 17:57
in the same project yes
Perry
@pfn
Feb 25 2016 17:57
inspect test:parallelExecution and make sure it's used
Gergő Törcsvári
@tg44
Feb 25 2016 17:58
its says "false"
Perry
@pfn
Feb 25 2016 17:59
make sure it's used as in it's being depended upon by other keys
not the value
e.g. are you running 'test' or it:test or something
Gergő Törcsvári
@tg44
Feb 25 2016 18:00
ohh I'm trying with the bare minimum: sbt test
I tryed
parallelExecution in ThisBuild := false concurrentRestrictions in Global += Tags.limit(Tags.Test, 1) fork in Test := true
too but all did the same
Gergő Törcsvári
@tg44
Feb 25 2016 18:11
any idea? possible missuses?
Erik LaBianca
@easel
Feb 25 2016 18:13
@tg44 i “solve” that problem by creating a seperate db for every test.
Gergő Törcsvári
@tg44
Feb 25 2016 18:14
its h2 with play and slick I tryed that way but that is painful too
my main problem is a bug in play-slick module :D
Perry
@pfn
Feb 25 2016 18:15
god, I HATE how scripted tests die on windows if the build fails to load
i.e. they hang forever
Erik LaBianca
@easel
Feb 25 2016 18:15
I don’t use play-slick for my tests, but I will also admit I am fighting issues with slick not properly cleaning up as we speak.
Perry
@pfn
Feb 25 2016 19:45
meh, coursier doesn't work for android
nafg
@nafg
Feb 25 2016 20:00
Why not?
Or, why would you want to run it on android?
Moses Nakamura
@mosesn
Feb 25 2016 21:00
hey, is there a way that I can compile a subproject without pulling in the dependencies I need for tests?
danielgratzl
@danielgratzl
Feb 25 2016 21:01
"If you want a dependency to show up in the classpath only for the Test configuration and not the Compile configuration, add % "test" like this:"
http://www.scala-sbt.org/0.13/docs/Library-Dependencies.html#Per-configuration+dependencies
eugene yokota
@eed3si9n
Feb 25 2016 21:02
@mosesn probably not. updateoperates on the dependency graph that contains all configurations
Moses Nakamura
@mosesn
Feb 25 2016 21:03
@danielgratzl we do that, but it gets pulled in anyway
thanks @eed3si9n, we’ll separate the tests out into a separate project then :+1:
eugene yokota
@eed3si9n
Feb 25 2016 21:03
by pulling in, you mean not invoke the dependency reoslution right?
Moses Nakamura
@mosesn
Feb 25 2016 21:03
yes
eugene yokota
@eed3si9n
Feb 25 2016 21:04
split it up
Moses Nakamura
@mosesn
Feb 25 2016 21:04
:+1:
danielgratzl
@danielgratzl
Feb 25 2016 21:12
ah now i see. good to know.
Johnny Everson
@everson
Feb 25 2016 21:15
Hi, in a project cross compiled to multiple scala versions, it is possible to have a plugin (sbt-coverage) only loaded for a certain scala version (2.11) and skip loading the plugin and ignoring its keys on the other scala versions?