These are chat archives for sbt/sbt

6th
Oct 2015
Richard Gomes
@frgomes
Oct 06 2015 08:58
@pfn : Thanks a lot for your help. :+1:
matanster
@matanster
Oct 06 2015 14:28
As to documentation, I think if it starts from an excellent piece about keys, tasks, configurations, it solves most of the more advanced things. Right now I have not found any good write-up about that, and thanks @SethTisue for the candor remark about the book. I suspect though that builds can be made easy by a well designed system accompanied by documents that address those that have not immersed in the building of sbt. As I learn more through this channel, experimentation etc, I'll consider a contribution ;) and until then I still wonder e.g. how do I make a task run only after all compilations have finished successfully, similar to how "publish" probably works :) anyone?
Not owning an intelliJ license, it is hard to follow the code, as Scala IDE support for sbt is still pending...
Seth Tisue
@SethTisue
Oct 06 2015 14:30
did you see Josh’s answer to your question?
matanster
@matanster
Oct 06 2015 14:31
oh, slipped my eyes.
Seth Tisue
@SethTisue
Oct 06 2015 14:31
I’m not sure if you’re asking “I want to automatically trigger X anytime everything gets compiled”, or whether you’re asking “I want a task that, like publish, requires everything to be compiled before it can run"
matanster
@matanster
Oct 06 2015 14:31
looking now; just showcases why I'm not worthy of using sbt :-1:
Seth Tisue
@SethTisue
Oct 06 2015 14:31
totally different questions
matanster
@matanster
Oct 06 2015 14:31
I'll chew on those
Seth Tisue
@SethTisue
Oct 06 2015 14:32
Josh assumed the former. if the latter, run inspect tree package, see what it depends on, and make your task depend on the (appropriate) same thing
matanster
@matanster
Oct 06 2015 14:40
@SethTisue I'm not entirely sure what is the material difference between the two cases, as I assume that publish triggers its dependencies, then waits for them to finish. Because @jsuereth's suggestions about triggers may sound a little hackish or just like something that will likely be "corrected" going forward, I'd avoid that, and gladly suffice with the second approach - a new task that depends on all prior compilations - which sounds like something trivial to accomplish with sbt... I'll visit the good links forwarded by @dwijnand and then take a stab at that. Just to mention i'm doing this in an sbt plugin, so it needs to be all done programatically.
Perry
@pfn
Oct 06 2015 15:34
@matanster you know you can use intellij CE right?
@matanster intellij CE can load up sbt just fine and let you browse the source easily
Perry
@pfn
Oct 06 2015 18:08
so, is there any way to make "bare" settings in build.sbt get applied after "project" settings in build.sbt are processed?
it seems that bare-settings are applied before the 'projects' are identified and loaded
Perry
@pfn
Oct 06 2015 18:25
hmm, is it a bad thing if I just go ahead and gave all my task/setting keys defined in my Keys object a pre-defined Configuration
would save so much time with typing "in Android" all the goddamn time
Perry
@pfn
Oct 06 2015 21:22
nice, switching to in Android by default breaks protify, need to make changes there
matanster
@matanster
Oct 06 2015 22:01

@pfn I installed intelliJ just for this sake, it looks much better for drilling into sbt than Scala IDE, at present. Looks like it needs to handled for showing macros, e.g. this is what I get for the definition of :=

 final def :=(v : T) : sbt.Def.Setting[T] = { /* compiled code */ }
 @scala.reflect.macros.internal.macroImpl

is it very different on your end?

Perry
@pfn
Oct 06 2015 22:02
yes, it shows the sources
you aren't very clear on what you're doing
but if you're not working in an sbtPlugin project, you must specify "download SBT sources and docs"
or you don't get sbt sources
matanster
@matanster
Oct 06 2015 22:04
This was just a quick test on a non sbtPlugin project.
So should I manually download the sources, or is that a specific command/option "download SBT sources and docs" there?
Previously I tried updateSbtClassifiers which failed with
[warn]     [FAILED     ] org.scala-sbt#compiler-interface;0.13.9!compiler-interface.jar(src):  (0ms)
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.9/srcs/compiler-interface-sources.jar
[warn] ==== sbt-plugin-releases: tried
[warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/compiler-interface/0.13.9/srcs/compiler-interface-sources.jar
[warn] ==== local: tried
[warn]   /home/matan/.ivy2/local/org.scala-sbt/compiler-interface/0.13.9/srcs/compiler-interface-sources.jar
[warn] ==== activator-launcher-local: tried
[warn]   /doesnotexist/repository/org.scala-sbt/compiler-interface/0.13.9/srcs/compiler-interface-sources.jar
[warn] ==== activator-local: tried
[warn]   /repos/activator-1.3.2/repository/org.scala-sbt/compiler-interface/0.13.9/srcs/compiler-interface-sources.jar
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scala-sbt/compiler-interface/0.13.9/compiler-interface-0.13.9-sources.jar
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/scala-sbt/compiler-interface/0.13.9/compiler-interface-0.13.9-sources.jar
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.9/srcs/compiler-interface-sources.jar
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_8_2/0.13.9/srcs/precompiled-2_8_2-sources.jar ...
[info]     [SUCCESSFUL ] org.scala-sbt#precompiled-2_8_2;0.13.9!precompiled-2_8_2.jar(src) (2788ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_2/0.13.9/srcs/precompiled-2_9_2-sources.jar ...
[info]     [SUCCESSFUL ] org.scala-sbt#precompiled-2_9_2;0.13.9!precompiled-2_9_2.jar(src) (2953ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_3/0.13.9/srcs/precompiled-2_9_3-sources.jar ...
[info]     [SUCCESSFUL ] org.scala-sbt#precompiled-2_9_3;0.13.9!precompiled-2_9_3.jar(src) (2816ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/scripted-plugin/0.13.9/srcs/scripted-plugin-sources.jar ...
[info]     [SUCCESSFUL ] org.scala-sbt#scripted-plugin;0.13.9!scripted-plugin.jar(src) (2844ms)
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     ::              FAILED DOWNLOADS            ::
[warn]     :: ^ see resolution messages for details  ^ ::
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
[warn]     :: org.scala-sbt#compiler-interface;0.13.9!compiler-interface.jar(src)
[warn]     ::::::::::::::::::::::::::::::::::::::::::::::
I recall sbt jars being numerous, so should I find and attach all of them by hand?