These are chat archives for sbt/sbt

23rd
Apr 2016
Miles Sabin
@milessabin
Apr 23 2016 13:19
I have a bunch of questions about working on the sbt tree ...
  1. Are there currently any tests for scalaOrganization?
  2. Either way where should they live?
  3. When running > scripted project/global-plugin I get a load of errors of the form javac version 1.8.0_51 may not be used to publish, it has to start with 1.6 due to javacVersionPrefix setting. I can set JAVA_HOME to point to a 1.6 JDK, but is this necessary?
  4. Is there any documentation on the DSL used in the various sbt/src/sbt-test/project/*/test files?
  5. Which (if any) of those files would make a good template to start putting together a new test?
Perry
@pfn
Apr 23 2016 14:22
@milessabin, just the source for scripted, @eed3si9n has a scripted guide that lists most of the commands
eugene yokota
@eed3si9n
Apr 23 2016 14:53
I am really going to move that stuff into sbt documentation today
Miles Sabin
@milessabin
Apr 23 2016 17:43
Ahh ... Interesting. I'm not looking to test a plugin. I want to test SBTs behaviour on a project which sets scalaOrganization. Am I looking at the right set of tests for examples?
Simon Schäfer
@sschaef
Apr 23 2016 18:05
Since sbt 0.13.11 color codes on the console do no longer work. What shall we use instead?
Or is it a bug?
Shane Delmore
@ShaneDelmore
Apr 23 2016 19:34
I have a multi-project build. I am trying to use sbt package to add it’s jars to a docker image, works fine, except I cannot figure out how to also add jars from a dependent project. Is there a way to reference dependent projects in my build.sbt to get it’s classpath?
Perry
@pfn
Apr 23 2016 21:09
@milessabin testing plugins is the same thing as testing sbt in this case
it allows you to script the running and evaluation of sbt
Shane Delmore
@ShaneDelmore
Apr 23 2016 22:07
Is there anything like an sbt repl? Been 8 hours in on a project today and getting next to nowhere because it is so hard to see what the runtime values of things are.
Feel like I must be missing an easier way.
eugene yokota
@eed3si9n
Apr 23 2016 22:08
@ShaneDelmore consoleProject
Shane Delmore
@ShaneDelmore
Apr 23 2016 22:09
Thank you so much. Read all the docs I can today plus all of sbt in Action over the past week and am no further today than I was last weekend. Hopefully console project will be my lifeline.
Shane Delmore
@ShaneDelmore
Apr 23 2016 22:10
I totally misunderstood what consoleProject was for. This looks useful.
Any way to jump scopes in sbt? For example, if I have ProjectA dependsOn ProjectB, from projectA can I look at say classpaths, but also separately look at ProjectB’s classpaths?
I can see (managedClasspaths in Compile) but can’t figure out how to change the scope.
eugene yokota
@eed3si9n
Apr 23 2016 22:14
you can scope the key by configuration or subproject
you'd probably run into some circular dependency with sbt 0.13
Shane Delmore
@ShaneDelmore
Apr 23 2016 22:14
so… val temp = (ProjectA/managedClasspaths in Compile)?
eugene yokota
@eed3si9n
Apr 23 2016 22:15
no. managedClasspaths in (projectA, Compile) I think
Shane Delmore
@ShaneDelmore
Apr 23 2016 22:16
Heck yeah….don’t think I would have ever found that. Works a treat though.
Thank you.
eugene yokota
@eed3si9n
Apr 23 2016 22:17
np. the formatting is messed up but someone contributed how to here on that - http://www.scala-sbt.org/0.13/docs/Define+Custom+Tasks.html
maybe we should document that in Scopes page too
Shane Delmore
@ShaneDelmore
Apr 23 2016 22:24
I definitely am missing some overall theory of sbt still. For example I can do things like “show packAllClasspaths” and see some sort of sequence, but not filter it, or assign it in the console. It’s like there are concepts that are so close to something I know, but not quite there.
Or I can show packAllClasspaths in sbt, but not in consoleProject. Seems some things I can only evaluate in sbt and some only in consoleProject maybe?
eugene yokota
@eed3si9n
Apr 23 2016 22:27
it probably depends if sbt-pack is an auto plugin or not
Shane Delmore
@ShaneDelmore
Apr 23 2016 22:27
Yep, it is. I wouldn’t have guessed that would make it behave differently though.
OlegYch
@OlegYch
Apr 23 2016 22:28
i don't think you can redefine settings in consoleProject?
unless you invoke reload explicitly..
Shane Delmore
@ShaneDelmore
Apr 23 2016 22:30
Hmm…Can you grab a list of files from a dir? All I really want to do is partition a set of files from the pack directory that get created so I can add them in two layers to a docker image as the rate of change is very different.
eugene yokota
@eed3si9n
Apr 23 2016 22:30
consoleProject is opening the hood (or bonnet in UK) of the car
Shane Delmore
@ShaneDelmore
Apr 23 2016 22:31
Initally tried without sbt-pack, using just sbt package but realized it does not package the classes from projects declared in dependsOn.
eugene yokota
@eed3si9n
Apr 23 2016 22:31
like foo ** "*.txt"?
gottago