These are chat archives for sbt/sbt

Sep 2017
Harrison Houghton
Sep 08 2017 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
Sep 08 2017 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?
Sep 08 2017 09:05
i think you don't - can't you enforce order by proper dependencies?
Sep 08 2017 09:20
is it possible to generate buildinfo without compiling?
from the sbt prompt
Olli Helenius
Sep 08 2017 09:22
@ykycxzsv yes, sbt buildInfo
Sep 08 2017 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
Sep 08 2017 09:32
hmm it should if you have aggregated the projects
what does show buildInfo say?
Sep 08 2017 09:38
ah, my bad. the particular project isn't aggregated, but intellij still tries to compile it. that explains it, thanks
Sebastian Bruckner
Sep 08 2017 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
Sep 08 2017 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
Sep 08 2017 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
Sep 08 2017 12:25
@ihoro the project folder contains itself .sbt files (or scala files)
so it needs to be compiled somewhere :)
Ihor Ostapenko
Sep 08 2017 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
Sep 08 2017 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
Sep 08 2017 12:51
Suhas Gaddam
Sep 08 2017 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
Sep 08 2017 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
Sep 08 2017 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:
The actual Command:

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
Sep 08 2017 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
Sep 08 2017 22:44
@suhasgaddam you can call those tasks sequentially with some control-flow using Def.taskDyn
Suhas Gaddam
Sep 08 2017 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
Sep 08 2017 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