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

bump mima previos version to 2.0.0 #795

Merged
merged 2 commits into from
Jan 9, 2020
Merged

Conversation

julien-truffaut
Copy link
Member

I am trying to verify binary compatibility for #794

I don't understand why mima reports lost of changes in monocle.std.nev. As far as I can tell, we haven't changed that file: v2.0.0...master

here is an example:

[error]  * method vectorToNev()monocle.PPrism in object monocle.std.nev has a different signature in current version, where it is <A:Ljava/lang/Object;>()Lmonocle/PPrism<Lscala/collection/immutable/Vector<TA;>;Lscala/collection/immutable/Vector<TA;>;Lcats/data/NonEmptyVector<TA;>;Lcats/data/NonEmptyVector<TA;>;>; rather than <A:Ljava/lang/Object;>()Lmonocle/PPrism<Lscala/collection/immutable/Vector<TA;>;Lscala/collection/immutable/Vector<TA;>;Lscala/collection/immutable/Vector<TA;>;Lscala/collection/immutable/Vector<TA;>;>;
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("monocle.std.nev.vectorToNev")

@travisbrown
Copy link

I've seen this before. The problem is that Scala 2.13.1 is boxing the value class for some weird reason, while 2.13.0 didn't:

sbt:monocle> ++2.13.0
[info] Setting Scala version to 2.13.0 on 22 projects.
[info] Reapplying settings...
[info] Set current project to monocle (in build file:/home/travis/code/projects/Monocle/)
sbt:monocle> coreJVM/mimaReportBinaryIssues
[info] Updating coreJVM...
[info] Done updating.
[info] Compiling 86 Scala sources to /home/travis/code/projects/Monocle/core/jvm/target/scala-2.13/classes ...
[info] Done compiling.
[success] Total time: 12 s, completed Jan 9, 2020 10:04:27 AM

But:

sbt:monocle> ++2.13.1
[info] Setting Scala version to 2.13.1 on 22 projects.
[info] Reapplying settings...
[info] Set current project to monocle (in build file:/home/travis/code/projects/Monocle/)
sbt:monocle> coreJVM/mimaReportBinaryIssues
[info] Updating coreJVM...
[info] Done updating.
[info] Compiling 86 Scala sources to /home/travis/code/projects/Monocle/core/jvm/target/scala-2.13/classes ...
[info] Done compiling.
[error]  * method pNevToOneAnd()monocle.PIso in object monocle.Monocle has a different signature in current version, where it is <A:Ljava/lang/Object;B:Ljava/lang/Object;>()Lmonocle/PIso<Lcats/data/NonEmptyVector<TA;>;Lcats/data/NonEmptyVector<TB;>;Lcats/data/OneAnd<Lscala/collection/immutable/Vector;TA;>;Lcats/data/OneAnd<Lscala/collection/immutable/Vector;TB;>;>; rather than <A:Ljava/lang/Object;B:Ljava/lang/Object;>()Lmonocle/PIso<Lscala/collection/immutable/Vector<TA;>;Lscala/collection/immutable/Vector<TB;>;Lcats/data/OneAnd<Lscala/collection/immutable/Vector;TA;>;Lcats/data/OneAnd<Lscala/collection/immutable/Vector;TB;>;>;
// Lots more here...

@dwijnand
Copy link
Contributor

dwijnand commented Jan 9, 2020

Formatted the error:

[error]  * method pNevToOneAnd()monocle.PIso in object monocle.Monocle has a different signature in current version, where it is

<A: Ljava/lang/Object; B: Ljava/lang/Object;> () Lmonocle/PIso<
  Lcats/data/NonEmptyVector<TA;>;
  Lcats/data/NonEmptyVector<TB;>;
  Lcats/data/OneAnd<Lscala/collection/immutable/Vector; TA;>;
  Lcats/data/OneAnd<Lscala/collection/immutable/Vector; TB;>;
>; rather than

<A: Ljava/lang/Object; B: Ljava/lang/Object;> () Lmonocle/PIso<
  Lscala/collection/immutable/Vector<TA;>;
  Lscala/collection/immutable/Vector<TB;>;
  Lcats/data/OneAnd<Lscala/collection/immutable/Vector; TA;>;
  Lcats/data/OneAnd<Lscala/collection/immutable/Vector; TB;>;
>;

The value was always boxed, that just wasn't reflected in the java signature until scala/scala#8127.

There is an enhancement in MiMa which aspires to spot this so users aren't thrown by it: lightbend-labs/mima#423

Note we recently added this piece of doc to the readme about IncompatibleSignatureProblem: https://github.com/lightbend/mima#incompatiblesignatureproblem. That's part of the error message in a future release: https://github.com/lightbend/mima/pull/435/files.

@travisbrown
Copy link

Ha, I totally forgot that I had reported this.

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

Successfully merging this pull request may close these issues.

3 participants