These are chat archives for sbt/sbt

21st
Sep 2016
nscarcella
@nscarcella
Sep 21 2016 04:25
Does anyone know if it is possible for sbt-release to generate a step that reloads sbt? Adding a ReleaseStep(Command.process("reload", _)) does not seem to do anything...
Dale Wijnand
@dwijnand
Sep 21 2016 06:37
@nscarcella I'm not sure. I would suggest you look at what it's doing when it changes the version, because it definitely has to reload after that.
Guillaume Massé
@MasseGuillaume
Sep 21 2016 16:02
is there a builtin way in sbt to see if source changed ?
Rob Norris
@tpolecat
Sep 21 2016 18:52
So ... it seems like sbt adds scala-xml and scala-parsers to the run classpath … is this expected?
It's misleading because it allows code to run in sbt that has a missing runtime dependency otherwise.
Dale Wijnand
@dwijnand
Sep 21 2016 19:21
@tpolecat Can't reproduce:
package t

object Main {
  def main(args: Array[String]): Unit = {
    val xml = <hello>world</hello>
    println(xml)
  }
}
> run
[info] Updating {file:/s/t/}t...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Compiling 1 Scala source to /s/t/target/scala-2.11/classes...
[error] /s/t/Main.scala:5: To compile XML syntax, the scala.xml package must be on the classpath.
[error] Please see https://github.com/scala/scala-xml for details.
[error]     val xml = <hello>world</hello>
[error]               ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 2 s, completed 21-Sep-2016 20:21:05
@tpolecat if you mean Scala 2.10, then yes. But that's what Scala 2.10 was, I think.
Rob Norris
@tpolecat
Sep 21 2016 19:24
Well it won't compile but it seems to be on the run classpath.
Do consoleQuick and then type <foo/>
Well, maybe just on console and not in run.
I don't know what's what.
I wonder how my code ran. I'll see if i can track it down.
Dale Wijnand
@dwijnand
Sep 21 2016 19:28
consoleQuick is Scala 2.10, so same reason. console is the REPL... and the REPL shipped with Scala has those extra jars in it too. So it's debatable if it's correct or not that sbt console does as well...
Perry
@pfn
Sep 21 2016 20:02
consoleQuick is scala 2.11 if you have scalaVersion := 2.11...
OlegYch
@OlegYch
Sep 21 2016 20:30
consoleProject is 2.10
Dale Wijnand
@dwijnand
Sep 21 2016 20:45
Yeah, sorry, missread as consoleProject
Derek Wickern
@dwickern
Sep 21 2016 22:09
if i have a dependency on a library, which is just a macro with no runtime component, can i exclude the jar from the distribution?
(the second question would be how to do that)
Dale Wijnand
@dwijnand
Sep 21 2016 22:17
I think so. Test it. Use the "provided" scope
Derek Wickern
@dwickern
Sep 21 2016 22:18
oh right, forgot about that one
Perry
@pfn
Sep 21 2016 22:28
I would use "compile-internal" not "provided" if you don't want it mentioned in the resulting pom
Dale Wijnand
@dwijnand
Sep 21 2016 22:36
:+1:
Perry with the sick "how do you know that" tricks
Perry
@pfn
Sep 21 2016 22:38
I use sbt much too much for my own good
Dale Wijnand
@dwijnand
Sep 21 2016 22:39
xD
Derek Wickern
@dwickern
Sep 21 2016 23:04
if my macro library depends on scala-reflect, would that dependency also be "compile-internal"?
Perry
@pfn
Sep 21 2016 23:16
no
Derek Wickern
@dwickern
Sep 21 2016 23:21
it's just used at compile-time right?
Perry
@pfn
Sep 21 2016 23:26
yes