https://kotlinlang.org logo
Title
s

shikasd

06/11/2020, 9:28 PM
Hey, curious, what is the situation with Kotlin MPP support? I have noticed a tracking issue and afaik this processor is based on JVM only compiler extension, but do you plan to bring support to all platforms? Overall, very solid first impression, thanks for sharing this!
j

Jiaxiang

06/11/2020, 9:34 PM
There is some work needs to be done in compiler to provide extension point for compiler plugins in other platforms. API itself is MPP compatible. If you are interested in trying out MPP you need to install a customized compiler in your local with the new extension points added. We can provide guide on how to build a compiler locally and use it 🙂
s

shikasd

06/11/2020, 9:36 PM
Do you plan to merge it with mainstream?
j

Jiaxiang

06/11/2020, 9:39 PM
We do plan to do so, but it will take a while for the change to be released given the release cycle. It's a good practice to stick to a stable release, so I would recommend to checkout out ksp branch on our repo, which is rebased to 1.4-M1 tag, and then make changes to add extension points.
s

shikasd

06/11/2020, 9:48 PM
Sure, thanks 🙂
One more question: do you release this version of compiler somewhere separately?
j

Jiaxiang

06/11/2020, 9:51 PM
No, the changes for extension point are still WIP, will let you know when it's ready, not sure if we want to make the compiler artifact hosted in repos.
r

romtsn

08/16/2020, 6:35 PM
@Jiaxiang I’d be curious on trying to make it work in mpp, could you give some hints?
j

Jiaxiang

08/17/2020, 7:04 PM
MPP needs at least creating some extension points in the analysis pass of other 2 platforms (Native and JS), and will also requires further efforts to add implementations for symbols from other platforms. Regarding the new extension points work, in JVM the extension point is called PartialAnalysisHandlerExtension, which is not available in other 2 platforms. It can involve changes to compiler itself therefore you might want to contact JB before doing so..