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

Make MiMa aware of @akka.annotation.ApiMayChange / @akka.annotation.InternalApi #160

Closed
ktoso opened this issue Jan 6, 2017 · 7 comments · Fixed by #647
Closed

Make MiMa aware of @akka.annotation.ApiMayChange / @akka.annotation.InternalApi #160

ktoso opened this issue Jan 6, 2017 · 7 comments · Fixed by #647
Assignees

Comments

@ktoso
Copy link
Contributor

ktoso commented Jan 6, 2017

We introduced a few annotations to mark that a given type should not matter when checking bin-compat:

  • @ApiMayChange - API still not quite stable, will change
  • @InternalAPI - internal API, can change however it wants to
  • @DoNotInherit - no one except the same library which provides this class should extend this class

Full types: https://github.com/akka/akka/pull/22110/files
Example usage: akka/akka#22109

MiMa could check if a type has annotations and if the name matches these then it can ignore warnings about a given type or method.

@dwijnand
Copy link
Collaborator

dwijnand commented Jan 6, 2017

I think it would be best to provide such a feature by enhancing MiMa's ProblemFilters:

https://github.com/typesafehub/migration-manager/blob/0.1.13/core/src/main/scala/com/typesafe/tools/mima/core/Filters.scala

@ktoso
Copy link
Contributor Author

ktoso commented Jan 6, 2017

ExcludeAnythingAnnotatedWith?

@dwijnand
Copy link
Collaborator

dwijnand commented Jan 6, 2017

Yeah. (maybe more simply ExcludeAnnotatedWith or ExcludeWithAnnotation)

@ktoso
Copy link
Contributor Author

ktoso commented Jan 6, 2017

Yeah, would be very cool :) I may hack on this... Would save us a lot of explaining to contributors who touch these classes.

@ktoso ktoso self-assigned this Jan 10, 2017
@dwijnand
Copy link
Collaborator

dwijnand commented Feb 8, 2017

This is midly related to #53

@dwijnand
Copy link
Collaborator

dwijnand commented Jun 8, 2021

I'm thinking we can do this by name. Probably best to stick to fully qualified name. But then I just realised it can a user-definable list of names, e.g. Scala 3's new @scala.annotation.experimental annotation, which the Scala 3 build can add to its build (e.g. scala/scala3#11721)

@SethTisue
Copy link
Collaborator

SethTisue commented Aug 2, 2022

Note that #647 only implements this for Scala 3, not for Scala 2.

(Because anything involving unpickling must be separately implemented, since Scala 3's pickle format is completely different, being TASTy-based.)

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

Successfully merging a pull request may close this issue.

3 participants