efemoney
05/24/2023, 1:59 AMListProperty.convention(…)
is that once user sets their own value on the property (including using ListProperty.add/addAll
), convention is cleared/ignored, so also language settings are cleared for a user that configures compilerOptions
in addition to enableLanguageFeature()
hfhbd
05/24/2023, 4:27 AMtapchicoma
05/24/2023, 7:36 AMlanguageSettings
is planned to be deprecatedAs Designed
😅Javier
05/24/2023, 8:06 AMefemoney
05/24/2023, 9:02 AMThis is the default behavior of Gradle. convention is the default value, if the user does not set the value explicitly.I know this. What I meant is specifically for
add
& addAll
, it just seems counter intuitive that they arent additive to the convention
this was intentional changeAh okay if this was intended I’m 💯 percent with that! Maybe document it so others are not as surprised. I can create an issue but only when I’m back from vacation next weekend.
create an issue with your use-caseLol my use case is I’m too lazy to type
"-XXLanguage:+"
😅 (plus I think the language settings one is less error prone as it validates that the string indeed maps to a LanguageFeature
) but its not an issue. I will move back to defining freeCompilerArgs
for language features.tapchicoma
05/24/2023, 9:16 AMLol my use case is I’m too lazy to typeWhat kind of"-XXLanguage:+"
XXLanguage
toggles are you enabling? 🤔 This thing should never be exposed in languageSettings
as it is too Kotlin compiler internal 😿efemoney
05/24/2023, 9:28 AMtapchicoma
05/24/2023, 9:31 AMefemoney
05/24/2023, 9:32 AMtapchicoma
05/24/2023, 9:40 AMkotlin {
compilerOptions { // Common compiler options that will be used as a convention to options in Kotlin source sets }
}
efemoney
05/24/2023, 9:41 AMtapchicoma
05/24/2023, 9:46 AMDefinitelyNonNullableTypes
should be enabled by default since Kotlin 1.7. Why do you enable it explicitly? 🤔efemoney
05/24/2023, 9:47 AMtapchicoma
05/24/2023, 9:48 AM-Xcontext-receivers
🙂efemoney
05/24/2023, 9:48 AMtapchicoma
05/24/2023, 9:49 AMLanguageFeature
, but for user-facing change we should have related -X
argumentefemoney
05/24/2023, 9:50 AMtapchicoma
05/24/2023, 9:51 AMfreeCompilerArgs
from compiler options and leave it as separate task input which produce a warning on non-empty value 🙂
But it is a distant change - first we need to expose experimental compiler options in DSL 😅efemoney
05/24/2023, 10:28 AM-opt-in=...
?tapchicoma
05/24/2023, 7:00 PMoptIn
should available in compiler options since 1.9.0: kotlin.compilerOptions.optIn.add(..)
progressive
was added to compiler optionsefemoney
05/24/2023, 7:28 PM