These are chat archives for sbt/sbt

18th
Sep 2017
Edmondo Porcu
@edmondo1984
Sep 18 15:22
Hello everyone, I have the classic "This symbol is required" problem because of conflicting dependencies. -Ylog-classpath is too difficult to interpret, are there other ways to solve the issue?
Jack Viers
@jackcviers
Sep 18 17:33
Hello evereyone. I'm trying to extend the sbt-release plugin, and I'm finding that sbt-release 1.0.6 isn't available for scala version 2.11 or 2.12. I'm building my plugin with the following crossSbtVersions settings: crossSbtVersions := Vector("0.13.16", "1.0.1")
If I hard-code 2.10 as the binarySbtVersion, the plugin resolves:
libraryDependencies += {
    val sbtV = (sbtBinaryVersion in update).value
    val scalaV = (scalaBinaryVersion in update).value

    if(sbtV == "0.13.16") {
      println("0.13.16")
      Defaults.sbtPluginExtra(sbtReleaseVersioSbt13, sbtV, scalaV)

    }else {
      Defaults.sbtPluginExtra(sbtReleaseVersionSbt1, sbtV, "2.10")
    }
  }
But then my scripted tests fail with binary incompatible plugins
eugene yokota
@eed3si9n
Sep 18 17:37
@edmondo1984 if you're using recent version of sbt, try evicted
sbtBinaryVersion will never be "0.13.16", I think
Jack Viers
@jackcviers
Sep 18 17:43
Ah. Ok.
I'm sanitizing the output of evicted. jas I'll have a gist
So set that to just 0.13?
Jack Viers
@jackcviers
Sep 18 17:51
set to 0.13.15 -- the 0.13.x version of the plugin resolves just fine. sbt-release for the 1.0.1 version fails to load during ^ compile and during scripted tests.
But changing crossSbtVersions to have 1.0.0 instead of 1.0.1 tries to download from here
And it should be trying to download from here: sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.github.gseitz/sbt-release/scala_2.12/sbt_1.0/1.0.6/ivys/ivy.xml
Jack Viers
@jackcviers
Sep 18 17:56
I thought that ^ sets the sbtVersion, which is what it should be attempting to use to download the 1.0.x dependency.
eugene yokota
@eed3si9n
Sep 18 17:57
I think there was a bug in sbt about scripted
might not be your fault
for a while all the plugins had to work around it
Jack Viers
@jackcviers
Sep 18 17:58
I read that report. Here's my copypasta of the scripted settings
lazy val scriptedExtraSettings = Seq(
  libraryDependencies ++= {
    CrossVersion.binarySbtVersion(scriptedSbt.value) match {
      case "0.13" =>
        Seq(
          "org.scala-sbt" % "scripted-sbt" % scriptedSbt.value % scriptedConf.toString,
          "org.scala-sbt" % "sbt-launch" % scriptedSbt.value % scriptedLaunchConf.toString
        )
      case _ =>
        Seq(
          "org.scala-sbt" %% "scripted-sbt" % scriptedSbt.value % scriptedConf.toString,
          "org.scala-sbt" % "sbt-launch" % scriptedSbt.value % scriptedLaunchConf.toString
        )
    }
  }
)
eugene yokota
@eed3si9n
Sep 18 17:59
iirc 0.13.16 no longer requires the hack
Jack Viers
@jackcviers
Sep 18 17:59
Is there another thing I have to override?
Ok. I'll rip that out
eugene yokota
@eed3si9n
Sep 18 18:01
sbt/sbt-ghpages@de0fc49
check out the commit by Yoshida-san
Jack Viers
@jackcviers
Sep 18 18:01
out. still tries to get the plugin with the wrong sbtVersion (or scalaversion, I thought 1.0.x was built against 2.11, but could be wrong)
[warn]          com.github.gseitz:sbt-release:1.0.6 (scalaVersion=2.12, sbtVersion=0.13)
Will do
That works!
Thank you @eed3si9n !
eugene yokota
@eed3si9n
Sep 18 18:05
np
Jack Viers
@jackcviers
Sep 18 18:06
fyi - you do still need the scripted hack to get scripted to run. But ^ works as expected now