Stylianos Gakis
08/09/2023, 10:01 AMvalues() to entries for all enums in our project as I bumped to Kotlin 1.9, I noticed that the generated files from apollo-kotlin are using it quite extensively. Would it benefit the generated code if it started generating entries instead of values()? Reading the KEEP makes me feel like they’re always the better choice to make going forward. Are there concerns about backwards compat or something like that?mbonnin
08/09/2023, 10:03 AMmbonnin
08/09/2023, 10:03 AMmbonnin
08/09/2023, 10:04 AMStylianos Gakis
08/09/2023, 10:09 AMYang
08/09/2023, 10:25 AMWe still want to support Kotlin < 1.9 so it'd have to be a config option or detect from KGP like we did when introducing sealed classesI’m naive but can we not figure out the Kotlin version in the current project? 😄
mbonnin
08/09/2023, 10:28 AMapollo- libs is 1.9 (source)mbonnin
08/09/2023, 10:28 AMapiVersion and languageVersionYang
08/09/2023, 10:39 AMmbonnin
08/09/2023, 10:40 AMkotlinPluginVersionmbonnin
08/09/2023, 10:41 AMmbonnin
08/09/2023, 10:42 AM.gradlew -i outputs somethingephemient
08/09/2023, 11:47 AM./gradlew buildEnvironment will say, if it's loaded from plugin (it won't if it's loaded from parent classpath though)Yang
08/09/2023, 11:47 AMephemient
08/09/2023, 11:49 AMmbonnin
08/09/2023, 11:57 AMephemient
08/09/2023, 12:04 PM-language-version
1.8 1.9 2.0
-api-version
1.8 no ??? ???
1.9 no yes ???
2.0 no yes yes
and I'm still not sure…bod
08/24/2023, 12:20 PM-language-version
1.8 1.9 2.0
-api-version
1.7 no no no
1.8 no yes yes
1.9 no yes yes
2.0 no yes yes
So language-version >= 1.9 && api-version >= 1.8mbonnin
08/24/2023, 12:22 PMlanguage-version = 1.9 && api-version = 1.7 , what API is missing?bod
08/24/2023, 12:23 PMe: Main.kt:3:18 The feature "enum entries" is only available since API version 1.8mbonnin
08/24/2023, 12:24 PMbod
08/24/2023, 12:26 PMkotlin.enums.EnumEntries<E> doesn't exist prior to 1.8mbonnin
08/24/2023, 12:26 PM