Often in my libs I have a package named `com.foo.m...
# library-development
b
Often in my libs I have a package named
com.foo.mylib.internal.*
which contains symbols not exposed in the API. Everything in it should be
internal
(or
private
) but sometimes I forget. I was sure there was a compiler plugin that can do that automatically (a bit like all-open but, all-internal?)... but can’t find it anymore. Did I dream it?
j
Seems like ABI validator dumper would at least assist, in that your build would fail and/or you'd explicitly see it added to public ABI.
b
💯 already using that
Well maybe it will be my next project 😅
e
if you're using explicit visibility mode, you can't forget to add a visibility modifier
b
Haha yeah I guess that's one solution. Not a huge fan tbh.
a
b
Ahh Konsist (this) looks promising
👍 1
s
Konsist has some issues with the latest Kotlin update, though: github.com/LemonAppDev/konsist/pull/1874
Maybe not for your case but I had to stay on 2.4.10 in one of my projects
b
ah good to know. I'm still not sure if the original idea (automatically mark symbols as internal) is a better one than just failing the build if something's incorrectly exposed.
of course Konsist exists and the compiler plugin I dreamed of doesn't, so... that's always a + 😄