Signature checks fail using value classes & upgrading to 2.12.9+ or 2.13.1+
See original GitHub issueIf you publish this code with Scala 2.12.8:
class Foo(val value: String) extends AnyVal
case class Bar(foo: Foo)
And then change the Scala version to 2.12.9 (or 10) and run sbt mimaReportBinaryIssues
, you’ll get these errors:
[error] * method unapply(Bar)scala.Option in object Bar has a different signature in current version, where it is (LBar;)Lscala/Option<LFoo;>; rather than (LBar;)Lscala/Option<Ljava/lang/String;>;
[error] filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("Bar.unapply")
[error] * static method unapply(Bar)scala.Option in class Bar has a different signature in current version, where it is (LBar;)Lscala/Option<LFoo;>; rather than (LBar;)Lscala/Option<Ljava/lang/String;>;
[error] filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("Bar.unapply")
[error] * static method andThen(scala.Function1)scala.Function1 in class Bar has a different signature in current version, where it is <A:Ljava/lang/Object;>(Lscala/Function1<LBar;TA;>;)Lscala/Function1<LFoo;TA;>; rather than <A:Ljava/lang/Object;>(Lscala/Function1<LBar;TA;>;)Lscala/Function1<Ljava/lang/String;TA;>;
[error] filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("Bar.andThen")
[error] * static method compose(scala.Function1)scala.Function1 in class Bar has a different signature in current version, where it is <A:Ljava/lang/Object;>(Lscala/Function1<TA;LFoo;>;)Lscala/Function1<TA;LBar;>; rather than <A:Ljava/lang/Object;>(Lscala/Function1<TA;Ljava/lang/String;>;)Lscala/Function1<TA;LBar;>;
[error] filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("Bar.compose")
[error] java.lang.RuntimeException: unapply_test: Binary compatibility check failed!
The issue seems to be the value class in the synthetic method signatures.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
scalameta/mdoc - Gitter
@olafurpg there seems to be an issue with 2.13. sbt docs/mdoc works fine in 2.12 but in 2.13 I get the following error:...
Read more >What's new in Scala 2.13? - SlideShare
I will look at 5 feature areas: compiler, standard library, language changes, Future and finally the most important change the redesigned ...
Read more >Zope2 - PyPI
Bugs reports should be made through the Zope bugtracker at ... webdav: Fixed permission check and error handling in DeleteCollection.
Read more >dafman36-2905.pdf - Air Force Personnel Center
In conjunction with a consistent unit physical fitness training program and individual fitness training, the Physical Fitness Assessment (PFA).
Read more >pytest Documentation - Read the Docs
How to re-run failed tests and maintain state between test runs . ... erately raising, whereas using @pytest.mark.xfail with a check ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The fix was in the compiler (https://github.com/scala/scala/pull/8127). My understanding is that scalap shows you what’s in ScalaSignature rather than the (erased) method descriptor or the (Java) (generic) signature, the latter of which is what Harrison fixed ~and MiMa analyses~ (edit: MiMa analyses the descriptor - thanks Arnout).
@diesalbla no, I think it can be broken down as follows:
Eq<String>
signature for a method that actually comparedCipherText
objectsString
s, would have encountered errors (because it in fact works withCipherText
objectsEq<CipherText>
signatureEq<String>
signature before, they would be in trouble now because it changed toEq<CipherText>
.