kotlin-unsigned icon indicating copy to clipboard operation
kotlin-unsigned copied to clipboard

Probable missuse of Optin

Open Gounlaf opened this issue 1 year ago • 0 comments

:wave:

I found your library on #kotlinlang slack 🙂.

Looking at arrays and gradle file, I'm a bit confused about the OptIn. If I'm right, you should not OptIn yourself, but propagate it (because you are building a library).

Here is a thread about this issue : https://kotlinlang.slack.com/archives/C3SGXARS6/p1696410990448249

Quoting CLOVIS-AI:

if you're making library, do not opt-in at the module-level, in fact, do not opt-in at all. Instead, propagate the warning to your users, otherwise their projects will break whenever this gets changed

You're calling a function which is marked as experimental by the @ExperimentalSerializationApi annotation. If you want to propagate the experimental warning to your caller, just annotate your function with @ExperimentalSerializationApi as well, this way they get the same warning :)

I may be wrong.

Regards.

Gounlaf avatar Dec 27 '23 11:12 Gounlaf