Skip to content

sbt-dotty does not load on sbt 1.3.0-SNAPSHOT #5671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
eed3si9n opened this issue Jan 3, 2019 · 8 comments
Closed

sbt-dotty does not load on sbt 1.3.0-SNAPSHOT #5671

eed3si9n opened this issue Jan 3, 2019 · 8 comments
Assignees

Comments

@eed3si9n
Copy link
Member

eed3si9n commented Jan 3, 2019

steps

  1. Use addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.2.6") with sbt 1.3.0-SNAPSHOT.

problem

[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.

expectation

sbt-dotty works with any sbt 1.x >= 1.1.5.

notes

https://github.com/lampepfl/dotty/blob/bcccb2f3ce83bb6bf12559c7ae018e0f12042d32/sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala#L92-L104

NonReleaseV requires z to be > 0.

@smarter
Copy link
Member

smarter commented Jan 3, 2019

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.

@eed3si9n eed3si9n changed the title sbt-dotty does not load on sbt 1.2.x sbt-dotty does not load on sbt 1.3.0-SNAPSHOT Jan 3, 2019
@eed3si9n
Copy link
Member Author

eed3si9n commented Jan 3, 2019

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?

@smarter
Copy link
Member

smarter commented Jan 3, 2019

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.

@smarter smarter self-assigned this Jan 3, 2019
@smarter
Copy link
Member

smarter commented Jan 3, 2019

By the way it'd be nice if sbt provided something like sbtFullVersion so that I wouldn't have to implement it myself badly :).

@smarter
Copy link
Member

smarter commented Jan 3, 2019

Or maybe just a high-level mechanism to enforce that this plugin requires a particular minimum version of sbt.

@eed3si9n
Copy link
Member Author

eed3si9n commented Jan 3, 2019

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

eed3si9n added a commit to eed3si9n/sbt that referenced this issue Jan 3, 2019
@eed3si9n
Copy link
Member Author

eed3si9n commented Jan 3, 2019

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

@changhe626

This comment has been minimized.

smarter added a commit to smarter/dotty that referenced this issue Feb 2, 2019
This fixes scala#5671. Also bump the minimum version to 1.2.7 due to
scalaCompilerBridgeBinaryJar usage, etc.
smarter added a commit to smarter/dotty that referenced this issue Feb 2, 2019
This fixes scala#5671. Also bump the minimum version to 1.2.7 due to
scalaCompilerBridgeBinaryJar usage, etc.
smarter added a commit to dotty-staging/dotty that referenced this issue Feb 2, 2019
This fixes scala#5671. Also bump the minimum version to 1.2.7 due to
scalaCompilerBridgeBinaryJar usage, etc.
smarter added a commit to dotty-staging/dotty that referenced this issue Feb 8, 2019
This fixes scala#5671. Also bump the minimum version to 1.2.7 due to
scalaCompilerBridgeBinaryJar usage, etc.
smarter added a commit to dotty-staging/dotty that referenced this issue Feb 11, 2019
This fixes scala#5671. Also bump the minimum version to 1.2.7 due to
scalaCompilerBridgeBinaryJar usage, etc.
smarter added a commit to dotty-staging/dotty that referenced this issue Feb 11, 2019
This fixes scala#5671. Also bump the minimum version to 1.2.7 due to
scalaCompilerBridgeBinaryJar usage, etc.
smarter added a commit to dotty-staging/dotty that referenced this issue Feb 11, 2019
This fixes scala#5671. Also bump the minimum version to 1.2.7 due to
scalaCompilerBridgeBinaryJar usage, etc.
smarter added a commit to dotty-staging/dotty that referenced this issue Feb 11, 2019
This fixes scala#5671. Also bump the minimum version to 1.2.7 due to
scalaCompilerBridgeBinaryJar usage, etc.
smarter added a commit to smarter/sbt that referenced this issue Apr 30, 2019
smarter added a commit to smarter/sbt that referenced this issue Apr 30, 2019
smarter added a commit to smarter/sbt that referenced this issue May 2, 2019
smarter added a commit to smarter/sbt that referenced this issue May 2, 2019
smarter added a commit to smarter/sbt that referenced this issue May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants