:tada: More good news for everyone wanting to try ...
# javascript
s
🎉 More good news for everyone wanting to try Kotlin 1.4-M1 with the new IR compiler! 🎉 Artifacts for kotlin-react and for ktor-clients are now available with IR artifacts! For
ktor-client-core
and
ktor-client-js
, version
1.3.2-1.4-M1-2
adds IR support. For
kotlin-react
and
kotlin-react-dom
, version
16.13.0-pre.93-kotlin-1.4-M1
adds IR support. Please note that especially the react wrappers heavily relied on specific characteristics of the default backend, which might make your current code incompatible with the new IR backend. The issues we’ve already identified are: - Interfaces implementing
RProps
or
RState
should be marked as
external interface
. Otherwise, you will get a
Uncaught ClassCastException
. If you’re implementing these interfaces via a
class
, you can mark it as
@JsExport
– however, we suggest evaluating if you could use an
external interface
instead. - To make your components work in
production
mode, please mark your
RComponent
implementations with
@JSExport
. Otherwise, you might run into issues such as
TypeError: l.render is not a function (react-dom.production.min.js:182)
If you’d like to see how we migrated the kotlin-full-stack-application-demo to IR, check the diff of our
1.4
branch: https://github.com/Kotlin/kotlin-full-stack-application-demo/compare/1.4 Of course, we know that this is far from ideal. The team is having a close look at these cases, and any other issues you might report, and will try their best to improve and polish the developer experience over time. Solutions currently being evaluated include compiler checks, IDE inspections, DCE adjustments, and more. We kindly ask for your support to help us spot any more issues with the IR compiler backend – so go and try it out 👌
👏 12
K 8
K 4
e
By the way, why don't you use
build.gradle.kts
? Do you consider it inferior to groovy scripts or the change just doesn't worth the effort?
i
It is just historical reasons :) No problem to convert it, and nothing special logic of groovy isn’t used