bennyl
11/20/2024, 5:46 PMYoussef Shoaib [MOD]
11/20/2024, 5:51 PMbennyl
11/20/2024, 5:51 PMdmitriy.novozhilov
11/21/2024, 7:59 AMdmitriy.novozhilov
11/21/2024, 8:00 AMbennyl
11/21/2024, 9:52 AMdmitriy.novozhilov
11/21/2024, 9:55 AMcompilation by gradle will stop workingIt will unless you will use the dev compiler for gradle compilation too
is there any plans to synchronize the versionsWe are considering it, but not in the nearest future And even they will be synchronized (e.g. 2.1.20 compiler for 2025.1 IDEA) there still will be problems, if your projects uses not the latest compiler (if you didn't manage to update it yet, for example) The ideal solution for this problem is to have the stable compiler API surface, which is also kinda planned but without any estimates
you are planning to drop support for 3rd party FIR compiler plugins?No such plans
bennyl
11/21/2024, 10:15 AMdmitriy.novozhilov
11/21/2024, 10:26 AMbennyl
11/21/2024, 10:28 AMbennyl
11/21/2024, 11:08 AM// first detect somewhere in your class if you are running with an old version (i.e., gradle execution):
private val isOldVersion =
FirSupertypeGenerationExtension::class.members.firstOrNull { it.name == "computeAdditionalSupertypes" }?.returnType?.arguments?.firstOrNull()?.type?.classifier == FirResolvedTypeRef::class
// define an adapter function - we will call it "hack" so that we will not forget to delete it when moving to kotlin 2.1+
fun <T> hack(input: List<FirResolvedTypeRef>) = (if (isOldVersion) input else input.map { it.coneType }) as List<T>
// we can then apply "hack" on the return value of computeAdditionalSupertypes
override fun computeAdditionalSupertypes( ... ): List<FirResolvedTypeRef> {
val toReturn: List<FirResolvedTypeRef> = ...
return hack(toReturn)
}
bennyl
11/21/2024, 11:12 AMbennyl
11/21/2024, 11:15 AM