https://kotlinlang.org logo
#getting-started
Title
# getting-started
j

Javier

09/29/2021, 8:14 PM
Someone is getting this issue when trying to disable explicit api?
Copy code
kotlin {
  explicitApi = ExplicitApiMode.Disabled
}
Error:
Copy code
Unknown value for parameter -Xexplicit-api: 'disabled'. Value should be one of {disable, strict, warning}
The enum class:
Copy code
enum class ExplicitApiMode(private val cliOption: String) {
    Strict("strict"),
    Warning("warning"),
    Disabled("disabled"); // this should be renamed to disable and/or in another place have to check for disabled instead of disable

    fun toCompilerArg() = "-Xexplicit-api=$cliOption"
}
h

hfhbd

09/30/2021, 7:49 AM
Just create an issue. BTW where did you found this code? https://github.com/JetBrains/kotlin/blob/master/compiler/util/src/org/jetbrains/kotlin/config/ExplicitApiMode.kt is correct
disable
j

Javier

09/30/2021, 7:55 AM
For some reason there is a mess there
I am going to open a youtrack issue
h

hfhbd

09/30/2021, 7:56 AM
Perfect!
2 Views