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

Clarify IncompatibleSignatureProblem message #435

Merged
merged 5 commits into from
Jan 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sealed abstract class Problem extends ProblemRef {
case ReversedMissingMethodProblem(ref) => s"${ref.memberString} is present only in $affectedVersion version"
case FinalMethodProblem(ref) => s"${ref.methodString} is declared final in $affectedVersion version"
case IncompatibleResultTypeProblem(ref, newmeth) => s"${ref.methodString} has a different result type in $affectedVersion version, where it is ${newmeth.tpe.resultType} rather than ${ref.tpe.resultType}"
case IncompatibleSignatureProblem(ref, newmeth) => s"${ref.methodString} has a different signature in $affectedVersion version, where it is ${orMIA(newmeth.signature)} rather than ${orMIA(ref.signature)}"
case IncompatibleSignatureProblem(ref, newmeth) => s"${ref.methodString} has a different generic signature in $affectedVersion version, where it is ${orMIA(newmeth.signature)} rather than ${orMIA(ref.signature)}. See https://github.com/lightbend/mima#incompatiblesignatureproblem"
case DirectAbstractMethodProblem(ref) => s"${ref.methodString} does not have a correspondent in $affectedVersion version"
case ReversedAbstractMethodProblem(ref) => s"in $affectedVersion version there is ${ref.methodString}, which does not have a correspondent"
case UpdateForwarderBodyProblem(ref) => s"in $affectedVersion version, classes mixing ${ref.owner.fullName} needs to update body of ${ref.shortMethodString}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
method source()scala.Tuple2 in class OptionPane has a different signature in new version, where it is ()Lscala/Tuple2<LMyPane<TA;>;Ljava/lang/String;>; rather than ()Lscala/Tuple2<Ljavax/swing/JOptionPane;Ljava/lang/String;>;
method show()java.lang.Object in class OptionPane has a different signature in new version, where it is ()TA; rather than <missing>
method this(scala.Tuple2)Unit in class OptionPane has a different signature in new version, where it is (Lscala/Tuple2<LMyPane<TA;>;Ljava/lang/String;>;)V rather than (Lscala/Tuple2<Ljavax/swing/JOptionPane;Ljava/lang/String;>;)V
method source()scala.Tuple2 in class OptionPane has a different generic signature in new version, where it is ()Lscala/Tuple2<LMyPane<TA;>;Ljava/lang/String;>; rather than ()Lscala/Tuple2<Ljavax/swing/JOptionPane;Ljava/lang/String;>;. See https://github.com/lightbend/mima#incompatiblesignatureproblem
method show()java.lang.Object in class OptionPane has a different generic signature in new version, where it is ()TA; rather than <missing>. See https://github.com/lightbend/mima#incompatiblesignatureproblem
method this(scala.Tuple2)Unit in class OptionPane has a different generic signature in new version, where it is (Lscala/Tuple2<LMyPane<TA;>;Ljava/lang/String;>;)V rather than (Lscala/Tuple2<Ljavax/swing/JOptionPane;Ljava/lang/String;>;)V. See https://github.com/lightbend/mima#incompatiblesignatureproblem
20 changes: 10 additions & 10 deletions functional-tests/src/test/class-method-generics-nok/problems.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
method genericWithChangingName()scala.Option in class A has a different signature in new version, where it is <T:Ljava/lang/Object;>()Lscala/Option<TT;>; rather than <U:Ljava/lang/Object;>()Lscala/Option<TU;>;
method backwardsCompatibleNarrowing()scala.Option in class A has a different signature in new version, where it is ()Lscala/Option<Ljava/lang/String;>; rather than ()Lscala/Option<Ljava/lang/Object;>;
method genericWithChangingName()scala.Option in class A has a different generic signature in new version, where it is <T:Ljava/lang/Object;>()Lscala/Option<TT;>; rather than <U:Ljava/lang/Object;>()Lscala/Option<TU;>;. See https://github.com/lightbend/mima#incompatiblesignatureproblem
method backwardsCompatibleNarrowing()scala.Option in class A has a different generic signature in new version, where it is ()Lscala/Option<Ljava/lang/String;>; rather than ()Lscala/Option<Ljava/lang/Object;>;. See https://github.com/lightbend/mima#incompatiblesignatureproblem
#
method cov1()java.lang.Object in class Api has a different signature in new version, where it is <A:Ljava/lang/Object;>()TA; rather than <missing>
method cov2()java.lang.Object in class Api has a different signature in new version, where it is <missing> rather than <T:Ljava/lang/Object;>()TT;
method con1(java.lang.Object)Unit in class Api has a different signature in new version, where it is <A:Ljava/lang/Object;>(TA;)V rather than <missing>
method con2(java.lang.Object)Unit in class Api has a different signature in new version, where it is <missing> rather than <T:Ljava/lang/Object;>(TT;)V
method cov1()java.lang.Object in class Api has a different generic signature in new version, where it is <A:Ljava/lang/Object;>()TA; rather than <missing>. See https://github.com/lightbend/mima#incompatiblesignatureproblem
method cov2()java.lang.Object in class Api has a different generic signature in new version, where it is <missing> rather than <T:Ljava/lang/Object;>()TT;. See https://github.com/lightbend/mima#incompatiblesignatureproblem
method con1(java.lang.Object)Unit in class Api has a different generic signature in new version, where it is <A:Ljava/lang/Object;>(TA;)V rather than <missing>. See https://github.com/lightbend/mima#incompatiblesignatureproblem
method con2(java.lang.Object)Unit in class Api has a different generic signature in new version, where it is <missing> rather than <T:Ljava/lang/Object;>(TT;)V. See https://github.com/lightbend/mima#incompatiblesignatureproblem
#
abstract method cov1()java.lang.Object in class Abi has a different signature in new version, where it is <A:Ljava/lang/Object;>()TA; rather than <missing>
abstract method cov2()java.lang.Object in class Abi has a different signature in new version, where it is <missing> rather than <T:Ljava/lang/Object;>()TT;
abstract method con1(java.lang.Object)Unit in class Abi has a different signature in new version, where it is <A:Ljava/lang/Object;>(TA;)V rather than <missing>
abstract method con2(java.lang.Object)Unit in class Abi has a different signature in new version, where it is <missing> rather than <T:Ljava/lang/Object;>(TT;)V
abstract method cov1()java.lang.Object in class Abi has a different generic signature in new version, where it is <A:Ljava/lang/Object;>()TA; rather than <missing>. See https://github.com/lightbend/mima#incompatiblesignatureproblem
abstract method cov2()java.lang.Object in class Abi has a different generic signature in new version, where it is <missing> rather than <T:Ljava/lang/Object;>()TT;. See https://github.com/lightbend/mima#incompatiblesignatureproblem
abstract method con1(java.lang.Object)Unit in class Abi has a different generic signature in new version, where it is <A:Ljava/lang/Object;>(TA;)V rather than <missing>. See https://github.com/lightbend/mima#incompatiblesignatureproblem
abstract method con2(java.lang.Object)Unit in class Abi has a different generic signature in new version, where it is <missing> rather than <T:Ljava/lang/Object;>(TT;)V. See https://github.com/lightbend/mima#incompatiblesignatureproblem
Original file line number Diff line number Diff line change
@@ -1 +1 @@
method foo()scala.Tuple2 in class A has a different signature in new version, where it is ()Lscala/Tuple2<Ljava/lang/Object;Ljava/lang/String;>; rather than ()Lscala/Tuple2<Ljava/lang/String;Ljava/lang/Object;>;
method foo()scala.Tuple2 in class A has a different generic signature in new version, where it is ()Lscala/Tuple2<Ljava/lang/Object;Ljava/lang/String;>; rather than ()Lscala/Tuple2<Ljava/lang/String;Ljava/lang/Object;>;. See https://github.com/lightbend/mima#incompatiblesignatureproblem
Original file line number Diff line number Diff line change
@@ -1 +1 @@
method boxedStringy()scala.Option in class Bar has a different signature in new version, where it is ()Lscala/Option<LFoo;>; rather than ()Lscala/Option<Ljava/lang/String;>;
method boxedStringy()scala.Option in class Bar has a different generic signature in new version, where it is ()Lscala/Option<LFoo;>; rather than ()Lscala/Option<Ljava/lang/String;>;. See https://github.com/lightbend/mima#incompatiblesignatureproblem