I've found this in the source code ```// exposed a...
# announcements
b
I've found this in the source code
Copy code
// exposed as public
@PublishedApi
internal fun timer(name: String?, daemon: Boolean) = if (name == null) Timer(daemon) else Timer(name, daemon)
docs of published contains:
Copy code
When applied to a class or a member with internal visibility allows to use it from public inline functions and makes it effectively public.
the question is: since it's internal why should I care about not making breaking changes to the declaration? It's just there for the purpose of chopping up big public inline functions, no? so published internal inline fun is like a private fun in class, right?
d
Api consumers can effectively call this by calling a public inline function that calls it. Therefore, modifying the declaration can break binary compatibility.
b
yeah they
technically
call it because the call in a public inline fun is effectively replaced by the code but still it's not like
timer("foo", false)
i
Why not like? In the generated client code you get exactly
timer("foo", false)
when calling public
timer("foo", ...)
for example.
d
It won't break source code if you got rid of the function
Im not an expert on the topic of compatibility though