I saw in the Kotlin roadmap that the compiler fron...
# compiler
s
I saw in the Kotlin roadmap that the compiler frontend is being reworked. Does this imply that the API is going to have significant breaking changes?
e
Yes.
👍 2
s
Is there a rough timeline/release number that this will come out?
r
The roadmap suggests an alpha in the next 6 months. Something similar was hinted in podcasts by engineers (also from Google) working on that.
d
Please note that most likely there won't be any compiler plugin API at all (or it will be in veeeeery unstable state)
I mean at the alpha release of course
s
@dmitriy.novozhilov will the existing API still be available at that time or how will it work? 🤔
r
I'm assuming the new frontend is the FIR stuff? So
FirExtension
would be usable (if unstable)?
d
@Strum355 existing API will be available to write plugins to current frontend. It won't work with new one (e.g. because new frontend doesn't have descriptors and binding context)
@rnett probably. Current
FirExtensions
is very early prototype which we added as proof of concept for FIR plugins. Most likely we will change most existing fit extensions (especially ones which are responsible for generating of new declarations)
👍 1
s
Is there a plan to have a replacement for descriptors? I use them heavily as map keys. Also for some quick clarification, will the compiler frontend only be in alpha for "pre-releases" of Kotlin or will it also be alpha in stable kotlin releases, meaning there may be kotlin versions without a compiler frontend API?
d
In FIR we have
FirDeclarations
, which are semantically similar to descriptors. But they have completely different API and we don't plan to make some bridge API between FIR and descriptors. So all existing compiler plugins won't be compatible with new frontend
will the compiler frontend only be in alpha for "pre-releases" of Kotlin or will it also be alpha in stable kotlin releases, meaning there may be kotlin versions without a compiler frontend API?
Compiler with enabled FIR will produce pre-release binaries and this mode won't be recommended for production use
j
Sorry if I am misunderstanding but does this mean Jetpack Compose UI in Android will have to then be re worked? They announced in IO that compose would be out in July. We have been following their work closely as we need to align with it. If they will have to re-write then so would I. I am just trying to see if that is the case. Thanks!
Ex. We have to use the
IrGenerationExtension
entry point to work around compose. Would that be part of this conversation?
r
No,
IrGenerationExtension
is backend, not frontend. And it’s actually the extension for the new compiler backend.
👍 1