These are chat archives for sbt/sbt

8th
Sep 2017
Harrison Houghton
@hrhino
Sep 08 01:13
I have cancelable in Global and I regularly get that happening to me.
Especially while trying to break out of "oh gods I forgot to enable coursier here"
(and, of course, I'm still on 0.13.x)
Roman Janusz
@ghik
Sep 08 07:50
Hello! Now that the Build trait is deprecated, what is the blessed way to ensure that settings from multiple .sbt files are loaded in specific order? For example, I have three build files in my project: build.sbt, version.sbt, local.sbt and I want them to be loaded in exactly that order. How do I do it?
ritschwumm
@ritschwumm
Sep 08 09:05
i think you don't - can't you enforce order by proper dependencies?
ykycxzsv
@ykycxzsv
Sep 08 09:20
is it possible to generate buildinfo without compiling?
from the sbt prompt
Olli Helenius
@liff
Sep 08 09:22
@ykycxzsv yes, sbt buildInfo
ykycxzsv
@ykycxzsv
Sep 08 09:28
@liff hm, thought i had tried that, but it turns out that unlike "compile", "buildInfo" doesn't process subprojects. is there a way to make it do that?
Olli Helenius
@liff
Sep 08 09:32
hmm it should if you have aggregated the projects
what does show buildInfo say?
ykycxzsv
@ykycxzsv
Sep 08 09:38
ah, my bad. the particular project isn't aggregated, but intellij still tries to compile it. that explains it, thanks
Sebastian Bruckner
@Sebruck
Sep 08 11:36
Hi, is there another way to let a sbt Task fail than throwing an Exception? I'd like to log.error (beautiful error message without stacktrace...) and then exit the Task with a failure (reflecting in a non zero exit code when called from console).
Edmondo Porcu
@edmondo1984
Sep 08 11:55
Hi, we do have problems when we publish multiple versions of the same snapshot: "unable to reparse..." . SBT downloads the xml but not the jar, is there anything inherently wrong in publishing multiple versions of the same snapshot, and therefore SBT doesn't support it?
Ihor Ostapenko
@ihoro
Sep 08 12:24
Hello, could you please briefly explain the meaning and difference of these dirs: ./target/, ./project/target/, and ./project/project/target/ ?
./target is expected to be the main one, and what about others?
Edmondo Porcu
@edmondo1984
Sep 08 12:25
@ihoro the project folder contains itself .sbt files (or scala files)
so it needs to be compiled somewhere :)
Ihor Ostapenko
@ihoro
Sep 08 12:25
aha, indeed
thanks :)
Is there a way to keep sbt plugin settings somewhere within project/ ? e.g. sbteclipse options in main build.sbt looks a bit wierd if another IDE is used, and it's not project related much, etc
I tried something like project/build.sbt, but it looks to be a wrong init phase
usual class import&use way I guess? or there is some special predefined place?
Dale Wijnand
@dwijnand
Sep 08 12:44
you can either throw them in sbteclipse.sbt at the root, or define them in a project/*.scala file and import them
Ihor Ostapenko
@ihoro
Sep 08 12:51
thanks
Suhas Gaddam
@suhasgaddam
Sep 08 15:37
In sbt 1.0, is it possible to call a Command in a Task?
In sbt 0.13, I was able to use Command.process, and in sbt 1.0 that API seems to have been dropped.
Justin Kaeser
@jastice
Sep 08 19:32
@suhasgaddam what's your use case? in general you won't want to do that because commands can change build state
Suhas Gaddam
@suhasgaddam
Sep 08 19:39

I am trying to cross-compile sbt-microsites to sbt 0.13 and sbt 1.0.
The line where Command.process is called: https://github.com/47deg/sbt-microsites/blob/sg-port-to-sbt-1.0.x/src/main/scala/microsites/MicrositeKeys.scala#L261
The actual Command: https://github.com/47deg/sbt-microsites/blob/sg-port-to-sbt-1.0.x/src/main/scala/microsites/MicrositeKeys.scala#L266

The Command itself is running clean, makeMicrosite, and ghpagesPushSite Tasks.
I didn't write the original implementation, but would it makes sense to switch this to a dynamic Task and remove the Command?

Justin Kaeser
@jastice
Sep 08 21:33
I think so, it doesn't seem to be doing anything that requires a command
all I see would make a lot more sense as task
Alexey Alekhin
@laughedelic
Sep 08 22:44
@suhasgaddam you can call those tasks sequentially with some control-flow using Def.taskDyn
Suhas Gaddam
@suhasgaddam
Sep 08 22:47
Thanks @jastice and @laughedelic . I'm going to switch that Command over to a dynamic Task, and probably re-evaluate some of the other Commands we have in a few of our sbt plugins(to see if they really need to be Commands).
Li Haoyi
@lihaoyi
Sep 08 22:50
is there a way to change the [info] label on the LHS of SBT's logspam to something else?
I want to make it more concise
[i] [e] [w] would be enough for me
maybe even turn it off