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

Mima error: different generic signature in current version #18522

Closed
He-Pin opened this issue Sep 6, 2023 · 6 comments
Closed

Mima error: different generic signature in current version #18522

He-Pin opened this issue Sep 6, 2023 · 6 comments

Comments

@He-Pin
Copy link
Contributor

He-Pin commented Sep 6, 2023

Compiler version

3.3.1

Minimized code

Update akka-http/pekko-http to 3.3.1 and run the test

https://github.com/apache/incubator-pekko-http/actions/runs/6099874005/job/16552993062#step:8:7315

Output

[info] Wrote PR validation report to /home/runner/work/incubator-pekko-http/incubator-pekko-http/target/pr-validation-report.txt
[error] java.lang.RuntimeException: Pull request validation failed! Mima failures: List(KeyValue(ScopedKey(Select(ProjectRef(file:/home/runner/work/incubator-pekko-http/incubator-pekko-http/,http)) / This / This,mimaResult),Problems(pekko-http: found 8 potential binary incompatibilities while checking against org.apache.pekko:pekko-http_3:1.0.0 
[error]  * method toString()java.lang.String in object org.apache.pekko.http.scaladsl.common.StrictForm#FileData has a different generic signature in current version, where it is <missing> rather than ()Ljava/lang/String;. See https://github.com/lightbend/mima#incompatiblesignatureproblem
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.http.scaladsl.common.StrictForm#FileData.toString")
[error]  * method toString()java.lang.String in object org.apache.pekko.http.scaladsl.server.AuthenticationFailedRejection has a different generic signature in current version, where it is <missing> rather than ()Ljava/lang/String;. See https://github.com/lightbend/mima#incompatiblesignatureproblem
[error]    filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.http.scaladsl.server.AuthenticationFailedRejection.toString")

Expectation

Compiles OK and No mima issue.

@He-Pin He-Pin added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Sep 6, 2023
@He-Pin
Copy link
Contributor Author

He-Pin commented Sep 6, 2023

@Kordyjan Just encounter this in apache/pekko-http#317

@WojciechMazur
Copy link
Contributor

WojciechMazur commented Sep 6, 2023

I've managed to reproduce it. That's important that it happends only when using sbt-mima-plugin 1.1.0 and with mimaReportSignatureProblems := true (both used in Pekko). Whith latest version of sbt-mima-plugin these validation errors are not present. Probably fixed in this 1.1.1 fix lightbend-labs/mima#696

@WojciechMazur WojciechMazur added area:backend and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Sep 6, 2023
@WojciechMazur
Copy link
Contributor

Bisect points to ad675af

It's bad that the binary output is different between 3.3.0 and 3.3.1, but since it has already shipped we should probably just embrace this fact and use 1 of two workarounds:

  • list of custom mima issue filters for toString methods
  • updating to latest mima-plugin version
  • optionally (not recommended) disable checking signatures

@He-Pin
Copy link
Contributor Author

He-Pin commented Sep 6, 2023

Bisect points to ad675af

It's bad that the binary output is different between 3.3.0 and 3.3.1, but since it has already shipped we should probably just embrace this fact and use 1 of two workarounds:

  • list of custom mima issue filters for toString methods
  • updating to latest mima-plugin version
  • optionally (not recommended) disable checking signatures

Thanks, Is it possible to check the mima in openCB too?

@sjrd
Copy link
Member

sjrd commented Sep 7, 2023

I think there's no real issue here. The change is valid and desirable. The correct fix is too upgrade MiMa to 1.1.1, which understands that it is a valid change.

@He-Pin
Copy link
Contributor Author

He-Pin commented Sep 7, 2023

Yes, let me close this.

@He-Pin He-Pin closed this as completed Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants