when i build my project idea displays this warning...
# intellij
c
when i build my project idea displays this warning:
Copy code
Warning:Kotlin: ATTENTION!
This build uses unsafe internal compiler arguments:
-XXLanguage:+NewInference
-XXLanguage:+SamConversionForKotlinFunctions
-XXLanguage:+ReferencesToSyntheticJavaProperties
This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
I don’t remember editing any kotlin compiler flags and I also don’t see it anywhere
at some point i had the m1 kotlin plugin installed but went back to stable. maybe thats left over from there?
w
Seems like these are options applied by gradle-kotlin-dsl plugin, see https://docs.gradle.org/current/userguide/kotlin_dsl.html#sec:kotlin_compiler_arguments
c
yes its on my buildSrc kotlin facet
this is my build.gradle.kts in the buildSrc directory:
Copy code
plugins {
    `kotlin-dsl`
}
repositories {
    jcenter()
}
w
Then you’re probably seeing the warning when building
buildSrc
project. But then these flags only affect your build code (buildSrc and build scripts), not the actual code in non-buildSrc projects
You can also remove this warning by putting this in your `buildSrc/build.gradle`:
Copy code
kotlinDslPluginOptions {
    experimentalWarning.set(false)
}
(not sure it’s proper syntax for
gradle.kts
)
c
thanks! Idea did not show that its only affecting buildsSrc. maybe its a usability error and i could file a youtrack
also I added that snippet to buildSrc/build.gradle.kts but idea still shows the warning. maybe it only works for gradle builds, but i use idea to build
w
Or maybe you actually set these options somewhere else, somehow? You may see where the message shows when you build project from command line, for example it might show you the warning after
Configuring: <some project>
message or something
c
i created a youtrack ticket for this https://youtrack.jetbrains.com/issue/KT-38904
i get the warning only in idea and not if building from command line
👍 1