Question to Google: is it possible to make `:compo...
# compose-desktop
o
Question to Google: is it possible to make
:compose:ui:ui-tooling-data
available for desktop? I’m experimenting with some tooling (kinda in-app inspector), and would like to process
CompositionData
, and it seems doing it via
SlotTree
is the best way of doing so.
j
I can't think of any technical nor political reasons why
ui-tooling-data
couldn't be an mpp module. The fact that it is android-only is probably just an oversight when the module was created. Happy to accept such a contribution, or we can try doing that change on our end. With regards to releasing it for non-android... we (google) only publish the android binaries at the moment. Publishing of the module for desktop will require pulling that change into the jetbrains/compose-jb repository and then publishing a build. I'd reach out to @Igor Demin for this.
o
Oh wow, that was fast 🚀 Thanks, Jim!
While we are here, who can I talk to about some details in group tree building, how to process it, etc. I’ve found yet another layer
LayoutInspectorTree
and around, which transforms Group tree and does some View stuff, so it’s not MPP either (probably by design).
@jim should it be moved out of block then in
ui-tooling
?
j
Why would it be moved out of the block? We build androidx in two modes (multiplatform and non-multiplatform). The non-multiplatform variant is the one we publish, and we build multiplatform as a sanity check. The two variants are configured independently, but have the same semantic effect. I'm not sure why you're looking at the non-multi-platform block. That same dependency is also defined in the
androidMain.dependencies
block below, for use with multiplatform build. I'm not sure I understand, can you elaborate on your question?
o
Sorry, it was a bit late yesterday, so I didn’t look at it with due attention. The problem is, that in multiplatform setup ui-tooling-data is not a dependency of ui-tooling. And thus, when depending on ui-tooling SlotTree and related is not available. Should I be depending on ui-tooling-data directly, or is it considered “implementation detail” and thus dependency should be added to desktopMain section of multiplatform setup of ui-tooling?
j
ui-tooling
does have a multiplatform dependency on
ui-tooling-data
in the
androidMain.dependencies
block.
Are we looking at the same version of the same file?
Presumably you would want to add that same dependency for Desktop, or move it to a
jvmMain.dependencies
block or move it to the
commonMain.dependencies
block, depending on where you need it (Jvm only, common, etc).
o
Yep, sorry for not being clear, I meant
commonMain.depenencies
, because eventually we’ll need it for CfD, CfW, etc. Can you please move it?
j
I can (https://android-review.googlesource.com/c/platform/frameworks/support/+/2172926) but have we verified that (1) the change does what we need, (2) that's the only bug/change remaining related to this module? For changes like this, I'm thinking it might be better/worth making the changes in the downstream Compose Multiplatform repository (the one Igor maintains), verify we're happy with the fixes and everything is working, and then upstream those changes? That allows you to iterate faster without putting Googlers in your critical path.
o
Thanks! I will discuss it with Igor and see how we can optimize things here.