These are chat archives for sbt/sbt

16th
May 2016
Yash Yadavalli
@yyadavalli
May 16 2016 03:27
I'm having an issue running scripted tests. I usually configure my local cache to be ~/.cache/ivy2 but when running the test its looking for the cache in ~/.ivy2. Is there any way to configure that?
eugene yokota
@eed3si9n
May 16 2016 04:01
@yyadavalli You might be able to pass something into scriptedLaunchOpts, but probably detect the current Ivy home and pass that along instead of hardcode to your custom settings in case someone else ends up running your build
@yyadavalli nope. just code reorganization, new incremental compiler, and bump up of Scala version thus far
Yash Yadavalli
@yyadavalli
May 16 2016 04:04
@eed3si9n Thanks
Miles Sabin
@milessabin
May 16 2016 11:02
Is there any way of getting the effect of dependencyOverrides which can override organization id as well as version?
eugene yokota
@eed3si9n
May 16 2016 14:55
@milessabin Not really, but if it's for swapping out the compiler you probably could do that by overriding update task
Miles Sabin
@milessabin
May 16 2016 15:35
@eed3si9n scalaOrganization seems to be working fine for implicit dependencies on scala-library. The problem is explicit transitive dependencies on scala-reflect (and possibly on scala-compiler).
Overriding the update task sounds promising ... are there any examples in the wild of doing that?
eugene yokota
@eed3si9n
May 16 2016 15:39
I can't think of an example off the top of my head
Miles Sabin
@milessabin
May 16 2016 15:44
Are there any examples of overriding any default SBT task?
Miles Sabin
@milessabin
May 16 2016 15:44
Thank you!
Dale Wijnand
@dwijnand
May 16 2016 15:45
those aren't redefining update, but they are cases of navigating its value
Miles Sabin
@milessabin
May 16 2016 15:47
I think that's probably all I need ... really I just need to be able to ensure that if org.scala-lang.scala-reflect is a dependency then it's removed from the managed classpath and org.typelevel.scala-reflect is added instead.
Dale Wijnand
@dwijnand
May 16 2016 15:48
can probably just match that org/name and use the copy method to replace org
Miles Sabin
@milessabin
May 16 2016 15:48
Yeah, that sounds plausible.
Sam Halliday
@fommil
May 16 2016 18:25
@milessabin don't forget scalap too.
Miles Sabin
@milessabin
May 16 2016 18:26
?
Sam Halliday
@fommil
May 16 2016 18:26
When overriding the Scala libs.
It's part of the standard distribution
Miles Sabin
@milessabin
May 16 2016 18:27
Gotcha.
Dale Wijnand
@dwijnand
May 16 2016 19:13
Uhh that might not work at all, from my basic understanding of update.. It's not going to magically get Ivy to download the right Typelevel artefacts..
You need some sort of interceptor where transitive modules are replaced.
After poms are resolved and before artefacts are fetched
.. Paging @jsuereth
eugene yokota
@eed3si9n
May 16 2016 22:53
the ScalaTool configuration can do the alternative Scala toolchain download, and update just needs to substitute whenever org.scala-lang appears into something else, no?
for that matter, it just might be enough to rewire classpath related tasks
Dale Wijnand
@dwijnand
May 16 2016 22:59
doesn't update just return a case class report of things, when everything is done and dusted ivy-wise?
eugene yokota
@eed3si9n
May 16 2016 23:01
@dwijnand yea. in this particular case, scala(-compiler|-library|-reflect) on their own doesn't introduce transitive dependencies so we can just let Ivy do its thing and still manipulate the result
it would be much trickier, if we are trying to substitute somewhere in the middle of the dependency graph which can affect eviction result etc
Dale Wijnand
@dwijnand
May 16 2016 23:03
what I was thinking was, even if you modify the coordinates after Ivy, from org.scala-lang to org.typelevel, that doesn't mean they're in the ivy cache to be used.
eugene yokota
@eed3si9n
May 16 2016 23:04
scalaOrganization key already takes care of that iiuc
@eed3si9n scalaOrganization seems to be working fine for implicit dependencies on scala-library. The problem is explicit transitive dependencies on scala-reflect (and possibly on scala-compiler).
we just need to prevent double entry of Scala-related JARs, I think
Dale Wijnand
@dwijnand
May 16 2016 23:07
alright
eugene yokota
@eed3si9n
May 16 2016 23:09
try forking scala/scala. it's fun