https://kotlinlang.org logo
#compose
Title
# compose
a

andylamax

06/25/2020, 12:40 PM
https://twitter.com/intelligibabble/status/1273339533891788800 This tweet referes to using compose in any tree. Does this mean it can be applicable to kotlin/jvm for desktop? or even used in kotlin/js?
s

shikasd

06/25/2020, 1:04 PM
As long as you have compiler plugin and runtime working on these platforms, it can be I experimented with something like this recently in non-android jvm and managed to get it working
a

andylamax

06/25/2020, 1:05 PM
Whooooooaaaaaaa . . . . . . . !! This opens a lot of doors
t

Tristan

06/25/2020, 2:13 PM
@shikasd you've been working on jetpack compose for WebUI with server side rendering. How much work do you think it would take to have it working with kotlin/js?
s

shikasd

06/25/2020, 4:14 PM
I'd wait for release of WeakRefs on js and kotlin 1.4, where k/js will have IR backend, then it should be easier 🙂
Otherwise, not sure about exact estimates
l

Leland Richardson [G]

06/25/2020, 4:57 PM
@shikasd what is it you need weak references for?
s

shikasd

06/25/2020, 5:00 PM
@Leland Richardson [G] Last time I have checked, compose used them in ObserverMap I was also thinking to replace it with WeakMap, feels kinda same mostly I was looking for IR generation for JS, and in 1.4-m2 it is still quite in progress 🙂
l

Leland Richardson [G]

06/25/2020, 5:01 PM
ahhh, observermap
didn’t think about that
was thinking you were thinking about the Compositions holder map which should probably go away…
cc @Chuck Jazdzewski [G] might have some thoughts. would ObserverMap in js need a WeakMap?
c

Chuck Jazdzewski [G]

06/25/2020, 5:13 PM
Yes. Much of
ObserverMap
is trying to work around Java allowing custom
equals
implementation and not having ephemerals so a
WeakMap
is the right
actual
for JS.
s

shikasd

06/25/2020, 5:28 PM
That's for confirming 🙂 Btw, do you have a timeline for merging compiler upstream?
l

Leland Richardson [G]

06/25/2020, 6:14 PM
Btw, do you have a timeline for merging compiler upstream?
Depends what you mean by this. If you mean making the compose compiler plugin part of kotlin proper, there are no plans for that currently.
If you mean when will we rebase our version of kotlin with master, the answer is as soon as we get the build to go green 🙂
and if you mean when will compose work with a proper version of kotlin… the hopeful but not certain answer for that is 1.4
s

shikasd

06/25/2020, 6:20 PM
I meant current master, but thanks for this extensive reply :)