These are chat archives for sbt/sbt

9th
May 2015
Josh Suereth
@jsuereth
May 09 2015 00:14
@jasongilanfarr you have to reload
We could maybe find a way to warn when you need to reload, but we can't force it. version is a "setting" in sbt, so it requires a reload to change
Jason Gilanfarr
@jasongilanfarr
May 09 2015 05:16
@jsuereth I actually implemented the check and an efficient way to reload just version. This really only affects the case where SBT is used in a continuous environment (the shell is persistent). It would seem to me that the scope for ThisBuild would be evaluated from a user requested task/command at the SBT shell time. This would seem to be consistent with a console execution of 'sbt <task>' and may be more relevant in an SBT server world where this may be the user expected behavior.
Its somewhat unfortunate to need to have a task to check the version vs the git version and have to have the user input a command in order to minimally reload a few settings. Another alternative could be to allow a seetingkey depend on the last modified time of a File, but this could be more error prone.
Jacek Laskowski
@jaceklaskowski
May 09 2015 08:59
@jsuereth if there’s a way to warn to reload, wouldn’t that be a place to execute reload then?
Dale Wijnand
@dwijnand
May 09 2015 13:35
I think Josh means shellPrompt which is State => String.. no way to execute a reload there, well at least nowhere to put the resulting new State (AFAIK)
Jacek Laskowski
@jaceklaskowski
May 09 2015 13:36
ah, right
that makes sense
Dale Wijnand
@dwijnand
May 09 2015 13:36
I think_ there might _maybe be a way with storeAs or keepAs or updateState, but either way it's probably a hack
I've long thought that version shouldn't be memoised.. but alas that ship has sailed now
Dale Wijnand
@dwijnand
May 09 2015 14:14
that way, also, sbt-git's versionWithGit would work better
Jason Gilanfarr
@jasongilanfarr
May 09 2015 16:09
The best I came up with is a task to check the version that compile depends on and a command to update only version and isSnapshot
Michael Pigg
@michaelpigg
May 09 2015 17:39
I've noticed that sbt adds an 'xsbt-api' phase to the compiler. What role does this phase play in the build?