These are chat archives for sbt/sbt

3rd
Jun 2016
Zheng Hu
@zhenghub
Jun 03 2016 07:07
I changed the repositories and removed repo.scala-sbt.org and added it's mirror. but sbt still goes repo.scala-sbt.org for scala. Is there some cache need be cleared?
thirstycrow
@thirstycrow
Jun 03 2016 07:10
How did you change the repositories?
Zheng Hu
@zhenghub
Jun 03 2016 07:11
I modified the ~/.sbt/repositories
[repositories]
  maven-local
  local
  activator-local: file://${activator.local.repository-/home/zhenghu/bin/activator-dist-1.3.7/repository}, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  activator-launcher-local: file://${activator.local.repository-${activator.home-${user.home}/.activator}/repository}, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  shareany: http://cdn.mirrors.shareany.com/maven/
  sbt-plugin: http://cdn.mirrors.shareany.com/sbt-bintray, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  sbt: http://cdn.mirrors.shareany.com/sbt-typesafe, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
removed all the typesafe repositories. All the content of repositories is above.
there still exists a repositories.bak under ~/.sbt/ , should I mv it away?
Zheng Hu
@zhenghub
Jun 03 2016 07:18
moving away repositories.bak didn't help...
thirstycrow
@thirstycrow
Jun 03 2016 07:21
Do you set SBT_OPTS correctly?
export SBT_OPTS="-Dsbt.override.build.repos=true"
Zheng Hu
@zhenghub
Jun 03 2016 07:21
Err, no memory about SBT_OPTS...
let me try
no, sbt still tries repo.scala-sbt.org...
thirstycrow
@thirstycrow
Jun 03 2016 07:26
Check the sbt command line with jps -v, what do you see?
Zheng Hu
@zhenghub
Jun 03 2016 07:33
nothing... it just work as previous try. I deleted the scala-2.10.6 so as to make sbt redownload and test our mirror. So until scala-2.10.6 be downloaded, sbt can't start...
~/document/git/userdata/userdata-web$ sbt jps -v
[info] Loading global plugins from /home/zhenghu/.sbt/0.13/plugins
[info] Updating {file:/home/zhenghu/.sbt/0.13/plugins/}global-plugins...
[info] Resolving org.scala-lang#scala-library;2.10.6 ...
[error] Server access Error: Connection reset url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.10.6/ivys/ivy.xml
thirstycrow
@thirstycrow
Jun 03 2016 07:35
that's not what I am talking about. Just type jps -v not sbt jps -v.
Zheng Hu
@zhenghub
Jun 03 2016 07:36
~/document/git/userdata/userdata-web$ jps -v
2751 Main -Xbootclasspath/a:/home/zhenghu/bin/idea-IC-143.382.35/bin/../lib/boot.jar -Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Dawt.useSystemAAFontSettings=lcd -Djb.vmOptionsFile=/home/zhenghu/bin/idea-IC-143.382.35/bin/idea64.vmoptions -XX:ErrorFile=/home/zhenghu/java_error_in_IDEA_%p.log -Djb.restart.code=88 -Didea.paths.selector=IdeaIC15
13886 Jps -Dapplication.home=/home/zhenghu/bin/jdk7/jdk1.7.0_79 -Xms8m
thirstycrow
@thirstycrow
Jun 03 2016 07:38
You killed sbt process?
Zheng Hu
@zhenghub
Jun 03 2016 07:38
err...yes. let me try again
~/document/git/userdata/userdata-web$ jps -v
2751 Main -Xbootclasspath/a:/home/zhenghu/bin/idea-IC-143.382.35/bin/../lib/boot.jar -Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Dawt.useSystemAAFontSettings=lcd -Djb.vmOptionsFile=/home/zhenghu/bin/idea-IC-143.382.35/bin/idea64.vmoptions -XX:ErrorFile=/home/zhenghu/java_error_in_IDEA_%p.log -Djb.restart.code=88 -Didea.paths.selector=IdeaIC15
14207 Jps -Dapplication.home=/home/zhenghu/bin/jdk7/jdk1.7.0_79 -Xms8m
14160 sbt-launch.jar -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M
thirstycrow
@thirstycrow
Jun 03 2016 07:43
"-Dsbt.override.build.repos=true" is missing, so you do not set SBT_OPTS correctly.
Zheng Hu
@zhenghub
Jun 03 2016 07:43
I used export, now I'll try with -D param
Yes, it works!
Thank you!
Anthony Holland
@aholland
Jun 03 2016 10:38
Hi - is there a way to clear the screen in sbt? I keep exiting just to clear and then restarting sbt. There is a way to shunt everything up but if I scroll back the old lines are still there.
Zheng Hu
@zhenghub
Jun 03 2016 10:57
what about shunting everything up twice?
Anthony Holland
@aholland
Jun 03 2016 11:09
Well, it doesn't actually do anything, i.e. not even insert any blank lines, so when I run the next command and it puts out three screens worth of output and scroll back, I have to very carefully try to see on which line I issue my compile command, else I might be looking at errors from the previous time. It's really silly that I can't clear the output.... what could be easier to implement than that?
Alec Zorab
@AlecZorab
Jun 03 2016 11:52
@aholland what platform + terminal are you using? Sounds like an issue with the terminal and/or jline
Julien Richard-Foy
@julienrf
Jun 03 2016 13:45
Hi, I’d like to write a lib that depends on sbt, I don’t know what to put in my libraryDependencies, it seems that I have to define an sbt plugin instead?
Simon Hafner
@reactormonk
Jun 03 2016 13:46
That's how it usually works. How would you like to use it?
Julien Richard-Foy
@julienrf
Jun 03 2016 13:47
My lib provides some useful build tasks
but it is not actually an sbt plugin
(I mean, an AutoPlugin)
It seems that putting sbtPlugin := true solves my problem.
Anthony Holland
@aholland
Jun 03 2016 16:39
@AlecZorab thanks - I'm just using it on the command-line on windows. I may simply not know the right key combination, but I did google around a bit.
Guillaume Massé
@MasseGuillaume
Jun 03 2016 16:45
is sbt-scripted released for sbt 0.13.11 ?
Matthew Pocock
@drdozer
Jun 03 2016 19:37
I'm getting A setting cannot depend on a task
is this something I can work around?
Justin Kaeser
@jastice
Jun 03 2016 19:42
what do you want to do? you can probably make it a task
Matthew Pocock
@drdozer
Jun 03 2016 19:51
I'm trying to feed in an exposed port from a docker container to the jdbc port of a slick source generation plugin
    slickPort := {
      val ports = dockerPort.value
      ports.hostPortForContainer(Port(5432)).get.number
    },
so I run the dockerPort task, find the exposed port for 5432, and then set the slickPort value equal to that
slickPort is defined as SettingKey[Int]
what would be the implications if I changed this to TaskKey[Int]?
Matthew Pocock
@drdozer
Jun 03 2016 20:10
OK, I've changed the keys in the sbt-slick plugin that need to be dynamically re-computed into tasks -- that seems to have done it
Matthew Pocock
@drdozer
Jun 03 2016 21:05
how can I tell sbt to run tasks in a specified, linear order?
not just with data flow dependencies, but so that one won't start until the other has ended
Matthew Pocock
@drdozer
Jun 03 2016 21:23
in particular, how do I guarantee that a task doesn't run too early?
Zainab Ali
@zainab-ali
Jun 03 2016 21:30
If you need to run tasks in a particular order, you probably want Def.sequential. Take a look at the docs for an example