These are chat archives for sbt/sbt

29th
Jun 2015
Sam Halliday
@fommil
Jun 29 2015 09:39
in a Build.scala file, is there a magical val to which I can assign default Settings?
i.e. the one that an auto-derived root project will inherit.
(and presumably any other project)
override def projectSettings sounds like it might be it from reading the source https://github.com/sbt/sbt/blob/0.13/main/src/main/scala/sbt/Build.scala
oh crap, that's for a Plugin
just settings by the sounds of it, but pull in the super.settings
Dale Wijnand
@dwijnand
Jun 29 2015 10:57
I think to do what you want to do you should create a local AutoPlugin, set it to auto-trigger and setup everything there. That way it will auto-enable for any project specified in your build
as an alternative to a commonSettings Seq
it's yet another holy war :P
Johan Stenberg
@johanstenberg92
Jun 29 2015 14:06
Hi, I have been looking at something that I can't really get right. So I want to use stagemonitor in Scalatra. How do I exclude a dependency in test? Since I don't want it there? So I want it in all other configurations but not in test. What is the syntax for that?
eugene yokota
@eed3si9n
Jun 29 2015 18:49
@johanstenberg92 not sure if you can write that using libraryDependencies, but you can exclude things manually via managedClasspath in Test
@fommil super.settings iirc is too powerful and it borks all sorts of initialization if you're not careful
eugene yokota
@eed3si9n
Jun 29 2015 18:54
if you want to magically load settings, auto plugin is what you want
Matthew Pocock
@drdozer
Jun 29 2015 18:54
has anyone written an sbt plugin to help with debugging unfound imlicits?
eugene yokota
@eed3si9n
Jun 29 2015 18:56
Matthew Pocock
@drdozer
Jun 29 2015 18:58
sad face
Dale Wijnand
@dwijnand
Jun 29 2015 19:00
@eed3si9n what about maybe libraryDependencies in Test? I know generally it's not what you want, but perhaps in this case..
eugene yokota
@eed3si9n
Jun 29 2015 19:00
libraryDependencies in Test doesn't make sense since update is done in a single shot
@drdozer have you tried -Xlog-implicits?
Matthew Pocock
@drdozer
Jun 29 2015 19:02
@eed3si9n yes, but it produces vast amounts of output
eugene yokota
@eed3si9n
Jun 29 2015 19:04
@dwijnand you missed an opportunity to plug your new creation
Dale Wijnand
@dwijnand
Jun 29 2015 19:05
which opportunity?
eugene yokota
@eed3si9n
Jun 29 2015 19:05
see my Stackoverflow answer :)
Dale Wijnand
@dwijnand
Jun 29 2015 19:05
ah! hehe
./dance
eugene yokota
@eed3si9n
Jun 29 2015 19:07
in reality I am not sure how easy it would be to use -= to exclude Attributed[File] or whatever that's stored in classpath. maybe you could try it
Sam Halliday
@fommil
Jun 29 2015 19:34
@eed3si9n actually, no, I don't want any magic. But super.settings is less magic than an autoplugin as far as I can tell.
Zack Powers
@Milyardo
Jun 29 2015 19:38
@fommil what about Defaults.defaultConfigs
eugene yokota
@eed3si9n
Jun 29 2015 19:41
The no magic solution is that the build user types in project.settings(commonSettings)
Sam Halliday
@fommil
Jun 29 2015 20:33
I'm fine with super.settings, thanks
Dale Wijnand
@dwijnand
Jun 29 2015 20:46
huh I wrote that an hour and a half ago, lol