Skip to content
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

NoSuchMethodError when the metabuild scalaVersion is 2.12.3 #191

Closed
dwijnand opened this issue Aug 1, 2017 · 4 comments
Closed

NoSuchMethodError when the metabuild scalaVersion is 2.12.3 #191

dwijnand opened this issue Aug 1, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@dwijnand
Copy link
Collaborator

dwijnand commented Aug 1, 2017

When upgrading the scalaVersion of sbt/io's metabuild to 2.12.3 (via upgrading to sbt 1.0.0-RC3) I get the following runtime error when running mimaReportBinaryIssues:

[error] java.lang.NoSuchMethodError: com.typesafe.tools.mima.core.Settings.StringSetting(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lscala/tools/nsc/settings/MutableSettings$StringSetting;
[error] 	at com.typesafe.tools.mima.core.Settings.<init>(Settings.scala:14)
[error] 	at com.typesafe.tools.mima.core.Config$.setup(Config.scala:48)

NOTE this is only relevant for sbt 1 builds, where the Scala version is 2.12.x; not sbt 0.13 builds.

The cause is the changes to StringSetting in this commit scala/scala@be5126f (from scala/scala#5964), which is part of Scala 2.12.3, isn't backwards binary compatible with what sbt-mima-plugin 0.1.15 for sbt 1 was compiled against.

For the short term we can release a new version of sbt-mima-plugin compiled against Scala 2.12.3. But for the long term we should either:

  • Rewrite the parts of MiMa that depend on scala.tools.nsc, or
  • Consider fully cross-building MiMa.
@dwijnand dwijnand added the bug label Aug 1, 2017
@dwijnand dwijnand added this to the 0.1.16 milestone Aug 1, 2017
@dwijnand dwijnand self-assigned this Aug 1, 2017
@dwijnand
Copy link
Collaborator Author

dwijnand commented Aug 1, 2017

Moved enhancements to #193. Short-term fix was merged in #190.

@dwijnand dwijnand closed this as completed Aug 1, 2017
@dwijnand
Copy link
Collaborator Author

dwijnand commented Aug 1, 2017

0.1.16 didn't fix this... 😑

@dwijnand dwijnand reopened this Aug 1, 2017
@dwijnand
Copy link
Collaborator Author

dwijnand commented Aug 1, 2017

The reason the release of 0.1.16 didn't fix this is due to an incremental compiler bug: it assumes that a minor version bump in scalaVersion (from 2.12.2 to 2.12.3) doesn't require recompiling files.

Most of the time this is true. But if you're a crazy scala.tools.nsc user... it's not.

I should've run clean before publishing.

For the short-term I've added that step explicitly to https://github.com/typesafehub/migration-manager/wiki/Releasing-MiMa. The long-term fix is (still) tracked in #190.

Going to release 0.1.17, actually with the exact same source..

@dwijnand
Copy link
Collaborator Author

dwijnand commented Aug 1, 2017

Actually.. #194..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant