addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.2.6") with sbt 1.3.0-SNAPSHOT.[error] java.lang.RuntimeException: The sbt-dotty plugin cannot work with this version of sbt (1.3.0-SNAPSHOT), sbt >= 1.1.5 is required.
sbt-dotty works with any sbt 1.x >= 1.1.5.
NonReleaseV requires z to be > 0.
This is very weird, dotty itself and https://github.com/lampepfl/dotty-example-project use sbt 1.2.x without issues. In fact, I just tried changing the version that dotty-example-project uses to 1.2.8 and I did not encounter the error you're reporting, can you share the project ?
In there sbtMinor is hardcoded to 1.
It's not, if sbtMinor > 1 then the error is not displayed, so 1.2.x is fine.
Where I actually saw this was in scripted test. I figured it was anything above sbt 1.1.x, but maybe the problem is with -SNAPSHOT?
ah indeed, looks like sbtFullVersion will return None for 1.3.0-SNAPSHOT, the error should not be emitted if we couldn't parse the version number.
By the way it'd be nice if sbt provided something like sbtFullVersion so that I wouldn't have to implement it myself badly :).
Or maybe just a high-level mechanism to enforce that this plugin requires a particular minimum version of sbt.
I think https://github.com/sbt/librarymanagement/blob/develop/core/src/main/scala/sbt/librarymanagement/VersionNumber.scala has semver check.
scala> import sbt.librarymanagement.{ VersionNumber, SemanticSelector }
import sbt.librarymanagement.{VersionNumber, SemanticSelector}
scala> VersionNumber("2.12.5").matchesSemVer(SemanticSelector(">=2.12"))
res1: Boolean = true
scala> import sbt.librarymanagement.{ VersionNumber, SemanticSelector }
import sbt.librarymanagement.{VersionNumber, SemanticSelector}
scala> VersionNumber("1.3.0-SNAPSHOT").matchesSemVer(SemanticSelector(">=1.1.5"))
res0: Boolean = true
scala> VersionNumber("1.1.0").matchesSemVer(SemanticSelector(">=1.1.5"))
res1: Boolean = false
please do not use sbt any more .please change to gradle or maven .it will be better than stb....