Hi guys, what are the current plans for KotlinJS? ...
# javascript
g
Hi guys, what are the current plans for KotlinJS? Like what are the primary features, changes, etc. the KotlinJS team are working on for this year?
👍 2
g
Probably the biggest thing now for Kotlin JS is new compiler’s backend, it’s internal thing, not a new feature, but as I understand it opens way for other improvements
🎉 2
👍 1
g
I actually remember asking a similar question last year a few months before kotlin conf and one of the kotlin/js devs told me they werent able to go into detail on future plans. Slipped my mind this time. But yeah I remember seeing the backend compiler mentioned before.
g
Also new Gradle plugin and integration of existing tools for Kotlin JS is big task
a
@gbaldeck it might actually have been me. Developers are not allowed to give any estimates due to an internal policy. At the time it also was quite an early stage of the whole rewrite rewrite and only the basic stuff worked. All that might have resulted in me being reluctant to share much. Sorry about that. =( So let me give you an update. We are still working on the new backend infrastructure. We've reached the point where all the language features are covered, and less then 2% of compiler tests fail. We are closing in on the private alpha stage. No estimates on when this will be available for preview still. The new backend is built in a completely different way then the old one, plus we are trying to: - make it modular and maintainable - support multiple ES target versions - much better DCE - make adding features and developing JS interop much easier for us - in particular better support of JS frameworks - improve performance (better incremental compilation, concurrent execution) - etc
👀 1
🔥 8
👍 7
😱 1
🙏 1
Which is why it takes time.
In my personal opinion a lot of the features which might have been quite hard to tackle with the old backend (e.g. ES6 support) are almost trivial in the new one. We have not reached the point where we could really boast about the new backend, and there are a lot of moving parts at the moment, but it looks really promising to me. I really think we'll be able to fix the stuff you guys have been complaining for ages (e.g. d.ts support, better DCE, angular support, etc.). And I really hope that the infrastructure we are working on will allow us to implement whatever new features we would need to quite easily.
❤️ 2
g
That's great news. Thanks for the update. Do you know if it will cause major breaking changes to current wrappers, like the React wrapper? (if getting all those features you mentioned does break current wrappers, I am all for it. The old wrappers can be scrapped/updated)
a
At first glance it seems they should be fine. Maybe with a few tweaks. At some point they might become obsolete though, as there is some work being done for better interop with JS libraries. I’m not familiar with what exactly is going on there, so that’s a maybe
g
I could see how they would become obsolete with better JS interop and support of d.ts files. Having no need for the wrappers would be great, bundle sizes would become smaller as well.
g
That sounds amazing if we won’t need js externals anymore. It does feel like a barrier for now
👍 1