These are chat archives for sbt/sbt

16th
Feb 2017
Pawel
@odwrotnie
Feb 16 12:59
how do you use a plugin from a dir?
Justin Kaeser
@jastice
Feb 16 14:53
is the lack of ansi colors in windows hardcoded in sbt or part of jline?
@odwrotnie do you mean a plugin in your project directory?
Perry
@pfn
Feb 16 16:24
@jastice part of jline, and it shows up if you use the windows sbt launcher/install I think
colors do
Justin Kaeser
@jastice
Feb 16 16:25
@pfn was jsut looking at the code, it says this:
  val formatEnabled: Boolean =
    {
      import java.lang.Boolean.{ getBoolean, parseBoolean }
      val value = System.getProperty("sbt.log.format")
      if (value eq null) (ansiSupported && !getBoolean("sbt.log.noformat")) else parseBoolean(value)
    }
so if I use -Dsbt.log.format=true it should override what jline says, but it doesn’t seem to :\
Perry
@pfn
Feb 16 16:26
you need -Djline.terminal=jline.UnixTerminal
either that or jansi.jar and SbtJansiLaunch
SbtJansiLaunch if you're in cmd, and jline.UnixTerminal if you're in conemu32 or something similar, I think
but it should be automatic when using the windows installer, these days
"$JAVA_CMD" -Dsbt.log.format=true $JAVA_OPTS $SBT_OPTS -cp "$WDIR/jansi.jar;$WDIR/sbt-launch.jar;$WDIR/jline-2.12.1.jar;$WDIR/classes" SbtJansiLaunch "$@"

sbt launcher script for Cygwin and MSYS

pfn @pfn shrugs where he got it from
Justin Kaeser
@jastice
Feb 16 16:29
Yeah, I’m using some intellij-specific emulated terminal and trying to get it to show colors
Perry
@pfn
Feb 16 16:30
dunno where that's handled
might want to make sure jline.terminal=jline.UnixTerminal is set
Justin Kaeser
@jastice
Feb 16 16:30
that one doesn’t seem to be doing anything
Perry
@pfn
Feb 16 16:31
and forcibly set TERM to something like vt100
Justin Kaeser
@jastice
Feb 16 16:45
no parameter seems to be doing anything :) will have to look deeper
Brian Hartin
@bjhartin
Feb 16 20:51
I'm having trouble using a mapping to include a file in a test artifact. It works fine for the non-test artifact. Here's the relevant snippet:
publishArtifact in Test := true

mappings in packageBin in Test += (baseDirectory.value / "foo.txt") -> "bar/foo.txt"

mappings in packageBin in Compile += (baseDirectory.value / "foo.txt") -> "bar/foo.txt"
Have I done something wrong with my test mapping?
Perry
@pfn
Feb 16 21:09
should work fine
perhaps test:packageBin doesn't use mappings in packageBin in Test
inspect test:packageBin
Brian Hartin
@bjhartin
Feb 16 21:11
I don't see any reference to mappings in either packageBin from inspect.
It does work for the non-test jar, though.
Perry
@pfn
Feb 16 21:14
it's through test:packageBin::packageConfiguration
and it should work fine according to the inspect tree
test:packageBin does not generate your foo-test.jar with foo.txt?
Brian Hartin
@bjhartin
Feb 16 21:15
No it doesn't. I'll retry with a clean new project to eliminate other causes.
Perry
@pfn
Feb 16 21:16
make sure mappings in packageBin in Test isn't modified elsewhere
otherwise, show test:packageBin::mappings
Brian Hartin
@bjhartin
Feb 16 21:23
Thanks @Perry. It's working now - it was a mistake on my end.