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

Ensure binary-compatibility with previous versrions #3315

Closed
BraisGabin opened this issue Dec 21, 2020 · 4 comments
Closed

Ensure binary-compatibility with previous versrions #3315

BraisGabin opened this issue Dec 21, 2020 · 4 comments

Comments

@BraisGabin
Copy link
Member

detekt is growing and we should think more about the compatibility that we want to give to our users.

I think that, in this topic, we could talk about two type of users:

  • cli or gradle plugin users
  • Plugin developers

We usually think a lot about the first one but not that much about the second and that impacts the first too. What I want to talk now is about the plugin developers.

We expose detekt-api and we should ensure source and binary compatibility. You can read about this here: https://zsmb.co/maintaining-compatibility-in-kotlin-libraries/

We usually think about source compatibility and we don't usually break it. But we usually break the binary compatibility. That's the reason that we get some issues of users that don't have detekt and detekt-format in the same version. And if someone wants to upload a plugin to maven-central he/she should be sure to generate a new version of it's plugin each time that we release a new version.

For that reason I think that we should start using japicmp. I never used and I don't know how it works exactly right now, but, if you agree we could find out and add it to our pipeline.

Here is an example of how okio uses it:

https://github.com/square/okio/blob/e21e897210a791012456ce5c11a7b9533b31cba9/.github/workflows/build.yml#L41-L46

@chao2zhang
Copy link
Member

We should also enable Explicit API mode to make sure we don't accidentally make private APIs public.

@cortinico
Copy link
Member

Are we considering this done with binary-compatibility-validator? Or are we planning to do more like enabling Explicit API more, running japicmp before releases, etc.?

@BraisGabin
Copy link
Member Author

I thought that this was closed. Do you think that we need something else? The explicit api sounds really good but we could open a different issue for that if we want it.

For me we can close this.

@cortinico
Copy link
Member

For me we can close this.

Let's close it for now.

binary-compatibility-validator is great to help us catch accidental API changes. On the other hand, it's not useful to get an aggregated overview of all the changes that we're shipping between two versions of detekt. We could take a look at japicmp if we think we need more control in the future.

@arturbosch arturbosch added this to the 1.16.0 milestone Jan 18, 2021
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

5 participants