Good evening,

All hopes to get Gradle 8 to work with the FrankenKotlin are not lost yet.

Le 2025-02-14 20:02, Julien Plissonneau Duquène a écrit :
test if that gradle will rebuild itself by next week, and then either debug it (probable outcome)

After finishing to fix Gradle's build the first run of the new binaries was a pleasant surprise as it went straight into lauching its daemon process (I was expecting some fight there), and that one started built-in configuration tasks, compilation of the packaging's init.d Groovy scripts, and then crashed cleanly on compiler errors after attempting to compile the pluginManagement block of the root settings.gradle.kts.

It then took me several debugging sessions (debugging the bootstrap gradle as well to figure out the expected code path) to narrow down the issue to a missing step in function call resolution. In the process I adjusted the Kotlin compiler configuration in the Gradle DSL plugin and backported a few more minor fixes and features into Kotlin. But I had to give up on my last backport attempt as it appeared that it had a non-trivial dependency on a much larger change set: the Kotlin compiler plugin underwent a significant refactoring for release 1.3.50, and that includes some changes in the way the script compiler is configured.

For the record, despite requiring Kotlin 2.0.21 the current Gradle 8 Kotlin DSL plugin is actually using the (legacy) K1 compiler, and this is among the reasons why I still think there are chances to get it to work with the FrankenKotlin.

I will now try to backport the whole scripting plugin from Kotlin 1.3.50 into our FrankenKotlin and see how it goes, as this backport will bring its code state to something much closer to what it currently looks like in Kotlin 2.0.20. This is probably the last "large" Kotlin backport that I will attempt before declaring that approach to be a dead end.

Have a nice week-end,

--
Julien Plissonneau Duquène

Reply via email to