binary-compatibility-validator
binary-compatibility-validator copied to clipboard
Kotlin files with non-callabale Java name and only non-public members show up in the public dump
Kind of an edge case but something like this:
// -foo.kt
internal fun doStuff() {}
will show up in apiDump:
public final class -fooKt { }
I think since the code is not reachable from neither Java nor Kotlin, this is technically not public API?
That's a nice catch!
It's not a public API, but it is, technically, a public ABI similar to how inline
functions are -- it can be inspected/called via reflection without isAccessible = true
. Anyway, that's unlikely to have any uses and it's safe to remove such signatures from public ABI
Thinking about it a bit more, it's definitely not part of ABI, because reflection is not part of it. And inline
functions are because they can be invoked directly from Java (without inlining tho)
Not sure if this can be considered part of the same issue or would be separate, the same also happens if you have a file that only contains members that are marked with nonPublicMarkers
Looks like this is fixed now? We have a bunch of false positives like this being removed when upgrading to 0.15.0-beta.2
(example here)