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

1.14.0 compatibility errors #509

Closed
ashawley opened this issue Aug 13, 2019 · 9 comments
Closed

1.14.0 compatibility errors #509

ashawley opened this issue Aug 13, 2019 · 9 comments

Comments

@ashawley
Copy link
Contributor

MiMa was going to be updated in #508 to version 0.5.0 from 0.3.0, but there are a lot of complaints. They also aren't the same complaints: They differ for Scala version, and for compiler target (JVM v. JS).

The 1.14.0 release was made from 9b4d431

The 1.14.0 release for 2.13.0 was made from 492ab2d

Here are the MiMa failures that have been collated and modified for brevity:

JVM

sbt:scalacheck> ++2.13.0
[info] Setting Scala version to 2.13.0 on 3 projects.
[info] Excluded 1 projects, run ++ 2.13.0 -v for more details.
[info] Reapplying settings...
[info] Set current project to scalacheck (in build file:./scalacheck/)
sbt:scalacheck> jvm/mimaReportBinaryIssues
[error]  * method apply(org.scalacheck.Cogen)org.scalacheck.Cogen in interface ...
[error]    filter with: ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.scalacheck.Cogen.apply")
[error] java.lang.RuntimeException: scalacheck: Binary compatibility check failed!
sbt:scalacheck> ++2.12.9
[info] Setting Scala version to 2.12.9 on 4 projects.
[info] Reapplying settings...
[info] Set current project to scalacheck (in build file:./scalacheck/)
sbt:scalacheck> jvm/mimaReportBinaryIssues
[error]  * method this(org.scalacheck.Test#Parameters,Int,Int,Int,Int,org.scalacheck.Test#TestCallback,Float,scala.Option,scala.Option,scala.Option)Unit in class ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Test#Parameters#cp.this")
[error]  * method apply(org.scalacheck.Cogen)org.scalacheck.Cogen in interface org.scalacheck.Cogen ...
[error]    filter with: ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.scalacheck.Cogen.apply")
[error]  * method this()Unit in class org.scalacheck.Gen has a different signature in current version, where it is [N/A] rather than ()V
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Gen.this")
[error]  * method this(org.scalacheck.Gen)Unit in object org.scalacheck.Gen#RetryUntilException ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Gen#RetryUntilException.this")
[error]  * method this(org.scalacheck.Gen,Int)Unit in class org.scalacheck.Gen#RetryUntilException has a different signature in current version, where it is [N/A] rather than (Lorg/scalacheck/Gen<TT;>;I)V
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Gen#RetryUntilException.this")
[error]  * method this()Unit in class org.scalacheck.Shrink has a different signature in current version, where it is [N/A] rather than ()V
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Shrink.this")
[error]  * method this()Unit in class org.scalacheck.Arbitrary has a different signature in current version, where it is [N/A] rather than ()V
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Arbitrary.this")
[error]  * method this(org.scalacheck.Gen,scala.Function1)Unit in class org.scalacheck.Gen#WithFilter has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Gen#WithFilter.this")
[error]  * method this(org.scalacheck.Gen#Parameters,Int,scala.Option)Unit in class org.scalacheck.Gen#Parameters#cp has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Gen#Parameters#cp.this")
[error]  * method this(org.scalacheck.commands.Commands,org.scalacheck.commands.Commands#Command,org.scalacheck.commands.Commands#Command,scala.collection.Seq)Unit in ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.commands.Commands#CommandSequence.this")
[error]  * method this(org.scalacheck.commands.Commands,java.lang.Object,scala.collection.immutable.List,scala.collection.immutable.List)Unit in ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.commands.Commands#Actions.this")
[error]  * method this(org.scalacheck.util.CmdLineParser,scala.collection.immutable.Map)Unit in class org.scalacheck.util.CmdLineParser#OptMap has ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.util.CmdLineParser#OptMap.this")
[error] (jvm / mimaReportBinaryIssues) scalacheck: Binary compatibility check failed!
sbt:scalacheck> ++2.11.12
[info] Setting Scala version to 2.11.12 on 4 projects.
[info] Reapplying settings...
[info] Set current project to scalacheck (in build file:./scalacheck/)
sbt:scalacheck> jvm/mimaReportBinaryIssues
[info] Updating jvm...
[info] Done updating.
[info] Compiling 21 Scala sources to ./scalacheck/jvm/target/scala-2.11/classes ...
[info] Done compiling.
[error]  * method buildableArrayList()org.scalacheck.util.Buildable in object org.scalacheck.util.Buildable has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.util.Buildable.buildableArrayList")
[error] (jvm / mimaReportBinaryIssues) scalacheck: Binary compatibility check failed!
sbt:scalacheck> ++2.10.7
[info] Setting Scala version to 2.10.7 on 4 projects.
[info] Reapplying settings...
[info] Set current project to scalacheck (in build file:./scalacheck/)
[error]    sbt:scalacheck> jvm/mimaReportBinaryIssues
[info] Updating jvm...
[info] Done updating.
[info] Compiling 21 Scala sources to ./scalacheck/jvm/target/scala-2.10/classes ...
[info] Done compiling.
[error]  * method buildableArrayList()org.scalacheck.util.Buildable in object org.scalacheck.util.Buildable has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.util.Buildable.buildableArrayList")
sbt:scalacheck> [error] (jvm / mimaReportBinaryIssues) scalacheck: Binary compatibility check failed!

JS

sbt:scalacheck> ++2.13.0
[info] Setting Scala version to 2.13.0 on 3 projects.
[info] Excluded 1 projects, run ++ 2.13.0 -v for more details.
[info] Reapplying settings...
[info] Set current project to scalacheck (in build file:./scalacheck/)
sbt:scalacheck> js/mimaReportBinaryIssues
[info] Updating js...
[info] Done updating.
[info] Compiling 21 Scala sources to ./scalacheck/js/target/scala-2.13/classes ...
[warn] there were 111 deprecation warnings (since 2.13.0); re-run with -deprecation for details
[warn] one warning found
[info] Done compiling.
[error]  * method apply(org.scalacheck.Cogen)org.scalacheck.Cogen in interface org.scalacheck.Cogen in current version does not have ...
[error]    filter with: ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.scalacheck.Cogen.apply")
[error]  * method deserializeTask(java.lang.String,scala.Function1)sbt.testing.Task in class org.scalacheck.ScalaCheckRunner has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.ScalaCheckRunner.deserializeTask")
[error] (js / mimaReportBinaryIssues) scalacheck: Binary compatibility check failed!
sbt:scalacheck> ++2.12.9
[info] Setting Scala version to 2.12.9 on 4 projects.
[info] Reapplying settings...
[info] Set current project to scalacheck (in build file:./scalacheck/)
sbt:scalacheck> js/mimaReportBinaryIssues
[info] Updating js...
[info] Done updating.
[info] Compiling 21 Scala sources to ./scalacheck/js/target/scala-2.12/classes ...
[info] Done compiling.
[error]  * method this(org.scalacheck.Test#Parameters,Int,Int,Int,Int,org.scalacheck.Test#TestCallback,Float,scala.Option,scala.Option,scala.Option)Unit in class org.scalacheck.Test#Parameters#cp has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Test#Parameters#cp.this")
[error]  * method apply(org.scalacheck.Cogen)org.scalacheck.Cogen in interface org.scalacheck.Cogen in current version does not have ...
[error]    filter with: ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.scalacheck.Cogen.apply")
[error]  * method deserializeTask(java.lang.String,scala.Function1)sbt.testing.Task in class org.scalacheck.ScalaCheckRunner has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.ScalaCheckRunner.deserializeTask")
[error]  * method this()Unit in class org.scalacheck.Gen has a different signature in current version, where it is [N/A] rather than ()V
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Gen.this")
[error]  * method this(org.scalacheck.Gen)Unit in object org.scalacheck.Gen#RetryUntilException has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Gen#RetryUntilException.this")
[error]  * method this(org.scalacheck.Gen,Int)Unit in class org.scalacheck.Gen#RetryUntilException has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Gen#RetryUntilException.this")
[error]  * method this()Unit in class org.scalacheck.Shrink has a different signature in current version, where it is [N/A] rather than ()V
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Shrink.this")
[error]  * method this()Unit in class org.scalacheck.Arbitrary has a different signature in current version, where it is [N/A] rather than ()V
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Arbitrary.this")
[error]  * method this(org.scalacheck.Gen,scala.Function1)Unit in class org.scalacheck.Gen#WithFilter has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Gen#WithFilter.this")
[error]  * method this(org.scalacheck.Gen#Parameters,Int,scala.Option)Unit in class org.scalacheck.Gen#Parameters#cp has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.Gen#Parameters#cp.this")
[error]  * method this(org.scalacheck.commands.Commands,org.scalacheck.commands.Commands#Command,org.scalacheck.commands.Commands#Command,scala.collection.Seq)Unit in class ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.commands.Commands#CommandSequence.this")
[error]  * method this(org.scalacheck.commands.Commands,java.lang.Object,scala.collection.immutable.List,scala.collection.immutable.List)Unit in ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.commands.Commands#Actions.this")
[error]  * method this(org.scalacheck.util.CmdLineParser,scala.collection.immutable.Map)Unit in class org.scalacheck.util.CmdLineParser#OptMap has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.util.CmdLineParser#OptMap.this")
[error] (js / mimaReportBinaryIssues) scalacheck: Binary compatibility check failed!
sbt:scalacheck> ++2.11.12
[info] Setting Scala version to 2.11.12 on 4 projects.
[info] Reapplying settings...
[info] Set current project to scalacheck (in build file:./scalacheck/)
sbt:scalacheck> js/mimaReportBinaryIssues
[info] Updating js...
[info] Done updating.
[info] Compiling 21 Scala sources to ./scalacheck/js/target/scala-2.11/classes ...
[info] Done compiling.
[error]  * method deserializeTask(java.lang.String,scala.Function1)sbt.testing.Task in class org.scalacheck.ScalaCheckRunner has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.ScalaCheckRunner.deserializeTask")
[error]  * method buildableArrayList()org.scalacheck.util.Buildable in object org.scalacheck.util.Buildable has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.util.Buildable.buildableArrayList")
[error] (js / mimaReportBinaryIssues) scalacheck: Binary compatibility check failed!
sbt:scalacheck> ++2.10.7
[info] Setting Scala version to 2.10.7 on 4 projects.
[info] Reapplying settings...
[info] Set current project to scalacheck (in build file:./scalacheck/)
sbt:scalacheck> jvm/mimaReportBinaryIssues
[info] Updating jvm...
[info] Done updating.
[info] Compiling 21 Scala sources to ./scalacheck/jvm/target/scala-2.10/classes ...
[info] Done compiling.
[error]  * method buildableArrayList()org.scalacheck.util.Buildable in object org.scalacheck.util.Buildable has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.util.Buildable.buildableArrayList")
sbt:scalacheck> [error] (jvm / mimaReportBinaryIssues) scalacheck: Binary compatibility check failed!
sbt:scalacheck> js/mimaReportBinaryIssues
[info] Updating js...
[info] Done updating.
[info] Compiling 21 Scala sources to ./scalacheck/js/target/scala-2.10/classes ...
[info] Done compiling.
[error]  * method deserializeTask(java.lang.String,scala.Function1)sbt.testing.Task in class org.scalacheck.ScalaCheckRunner has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.ScalaCheckRunner.deserializeTask")
[error]  * method buildableArrayList()org.scalacheck.util.Buildable in object org.scalacheck.util.Buildable has a different signature ...
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.scalacheck.util.Buildable.buildableArrayList")
[error] java.lang.RuntimeException: scalacheck: Binary compatibility check failed!
[error] (js / mimaReportBinaryIssues) scalacheck: Binary compatibility check failed!
@ashawley
Copy link
Contributor Author

This will take some investigation. I haven't checked anything, but I can only wonder the following:

  1. new changes merged to master since 1.14.0
  2. some strangeness of MiMa 0.5
  3. just some strangeness with ScalaCheck's codebase
  4. the 2.13 changes merged to master
  5. byte code from later in the 2.12 series is different since 2.12.5

@SethTisue SethTisue changed the title 1.14.0 compatability errors 1.14.0 compatibility errors Aug 13, 2019
@ashawley
Copy link
Contributor Author

It appears the strangeness with MiMa is new functionality about IncompatibleSignatureProblem. From the release notes for 0.4.0:

This problem is reported when a method's erased signature has remained the same, but its full type signature has changed. Such a change is not always binary incompatible, but typically worthwhile to manually investigate and explicitly confirm. You can exclude all such problems with a ProblemFilters.exclude[IncompatibleSignatureProblem]("*").

@ashawley
Copy link
Contributor Author

ashawley commented Aug 14, 2019

The issue with Cogen.apply is from partially reverting #395 in #403. It's supposed to be binary compatible change, and wasn't flagged by MiMa 0.3.0, but it is in 0.5.0.

@non
Copy link
Contributor

non commented Aug 16, 2019

@ashawley Jeez, this is all pretty intense. It's too bad the 2.13 release used a different commit.

My suggestion is probably for us to exclude the new functionality for now, fix anything else that is definitely broken, and the reenable it and see where we stand.

@non
Copy link
Contributor

non commented Aug 16, 2019

(Also apologies for my silence -- I'm in the middle of moving to a new apartment so outside of work I've been quite busy recently.)

@smarter
Copy link
Contributor

smarter commented Aug 16, 2019

The issue with Cogen.apply is from partially reverting #395 in #403. It's supposed to be binary compatible change, and wasn't flagged by MiMa 0.3.0, but it is in 0.5.0.

Changing def apply[T](implicit ev: Cogen[T]): Cogen[T] = ev to private[scalacheck] def apply[T](ev: Cogen[T]): Cogen[T] = ev is definitely backwards binary-compatible, this sounds like a mima bug to me, maybe it's getting confused with the overload ? /cc @dwijnand

@ashawley
Copy link
Contributor Author

I agree. I've opened lightbend-labs/mima#375

@ashawley
Copy link
Contributor Author

Closing since #508 and #510 have been merged

@ashawley
Copy link
Contributor Author

The summary of lightbend-labs/mima#375 is that making object methods package-private is not binary compatible for Java callers of the static forwarders. Java callers are probably not a case ScalaCheck needs to worry about, especially for Cogen, but better to be on the safe side I suppose.

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

No branches or pull requests

3 participants