https://kotlinlang.org logo
l

louiscad

11/21/2019, 5:36 PM
Proposal: per symbol name experimental opt-in. Use case example : I want to use
kotlinx.coroutines.invoke
for
CoroutineDispatcher
without having to use either of these two inconvenient options: 1. Adding
@UseExperimental(ExperimentalCoroutinesApi::class)
at each use-site 2. Opting-in for all
@ExperimentalCoroutinesApi
and being bitten later when other experimental APIs change that I didn't see coming. I'd want to be able to opt-in for these in Gradle config (or compiler config) in a way or another, I can search for ideas on how to define it. The fully qualified name (or a pair of imports + symbol names) would be enough, opting-in for all functions overloads, in a KDoc fashion.
👀 1
k

Ky Leggiero

11/24/2019, 10:20 PM
Isn't there a compiler argument for this already?
l

louiscad

11/24/2019, 11:29 PM
@Ky Leggiero I'm talking about fine grained opt-in, there's no such compiler argument at the moment.
👍 1
2 Views