These are chat archives for sbt/sbt

23rd
Jan 2017
Simeon H.K. Fitch
@metasim
Jan 23 15:44
Is there an easy way to determine which resolver found a particular artifact? I'm looking in the Ivy reports under target and the "Resolver" column just says sbt-chain.
OlegYch
@OlegYch
Jan 23 15:44
look in ivy cache
Simeon H.K. Fitch
@metasim
Jan 23 15:47
Ah, thanks. (in the <artifact>-<version>.properties file.)
Nicolas Rinaudo
@nrinaudo
Jan 23 20:07
I'm trying to update old SBT code, and I'm afraid some of the old operators confuse me
in particular, the following:
gitBranch in updatedRepository <<= gitBranch ?? Some("ghpages")
how to I replace "ghpages" by the value inside a SettingKey[String], since I'm not allowed to use .value ?
Dale Wijnand
@dwijnand
Jan 23 20:11
isn't that just something like gitBranch in updatedRepository := gitBranch.?.value orElse Some("ghpages")?
Nicolas Rinaudo
@nrinaudo
Jan 23 20:12
is that a rethorical question? :)
(it seems like it, except maybe getOrElse rather than orElse. At least that compiles, although I've no idea what's happening, yet)
Dale Wijnand
@dwijnand
Jan 23 20:16
I'm not sure what the types of those keys are, but something along those lines is what you want basically.
Nicolas Rinaudo
@nrinaudo
Jan 23 20:17
do I not lose some of the lazyness afforded by ?? that way though?
well, I guess I can work it out from there. Thanks, @dwijnand !
Dale Wijnand
@dwijnand
Jan 23 20:17
Possibly. I've not worked with ?? much.
Nicolas Rinaudo
@nrinaudo
Jan 23 20:18
me either, I've just found out about it
Dale Wijnand
@dwijnand
Jan 23 20:18
in this specific case it's "lazy Some" so I think you'll be fine
Dan Di Spaltro
@dispalt
Jan 23 21:59
getOrElse is usually lazy right?
Perry
@pfn
Jan 23 22:06
yes, it's => B
Dan Di Spaltro
@dispalt
Jan 23 23:31
Is there a Project.runTask for InputTasks?
Dan Di Spaltro
@dispalt
Jan 23 23:38
nvm, figured it out
inputTask.toTask(blah) then just run that =)