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
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:
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-apiand 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