03/02/2021, 3:12 PM
Trying and just wanted to write out some thoughts/experiences. Just opening the automatically created compose demo project sends my IDEA into a indexing-importing-downloading-something frency for over 10+ minutes. Trying to update the Kotlin plugin version in the build.gradle.kts and somehow expecting "1.4.<alt+space>" to be autocompleted to avaiable versions, seeing it still does not work. So updating it by manually searching the versions. Trying to create a regular 'Application' run configuration which fails to find the main class (the searching-dialog looked like it was doing something for 1-2 minutes, but I did not care to wait and find out if it just went into an endless loop or is going down every class ever it finds on my PC). Accepting I should use the gradle task. Realizing the configured gradle-wrapper is 6.7 while 6.8.3 is the latest one. Running
./gradlew wrapper --gradle-version 6.8.4
and noticing the typo after gradle already accepted the command without any feedback whatsoever. Trying any other gradle command including
./gradlew wrapper --gradle-version 6.8.3
no longer works unless I edit the config file manually. Lots and lots of more re-indexing.
./gradlew clean
taking 1m20s. Launching the compose demo application only to see an error about invalid MSI version. Luckily I know MSI and realize it needs three version parts, the wizard created only 1.0, so changing it to 1.0.0. Running the application finally works. Trying to Update the compsoe version and changing some things about the main class, gradle/idea deciding to re-index just random things (it included my JDK!?) and taking another few minutes. While doing this all, had two IDEA errors (which I reported) inbetween. So the whole 'test' took almost two hours… granted, with sidetracking. But the Gradle<->Idea<->compose experience has really not been stellar so far. :(
I have been using IDEA for some years now and also have a bunch of plugins installed. I use IDEA for various tasks (when opening projects, the indexing shows me something about go-modules, even tho I just opened a java project.). So several of the things I experienced might be down to an old, crusty IDEA installation and maybe some wrong choices I made in the settings, which I sync with my account. I just wonder if anyone has similar experiences, if things like the Gradle importing/indexing times are considered 'normal' or what I am missing here.


03/02/2021, 3:31 PM
Thanks for the report, we’ll try to adjust some of the experiences, and note that next Kotlin plugin will have some of the issues fixed.


03/02/2021, 3:38 PM
I know this is all very fresh and the focus is somewhere else right now. And the gradle performance issues: I think the gradle team is aware of some rough edges and is trying to improve things with the current releases. Nothing JB can do. So sorry if my report sounded a bit too negative… it is not meant like this. Maybe I should nuke my IDEA synced settings and start fresh with carefully configured options and plugins. And ask my boss for a new laptop. This might help me with the slow slow imports/indexing. 😛

Yan Pujante

03/02/2021, 5:33 PM
I have also had plenty of issues when following the exact same steps (meaning following the tutorial and letting IDEA create the project for me). It was a bit of an exercise in frustration to find a combination of compose-desktop version / kotlin that would work on my machine. Especially, since like you point out, every time you change a version, it is taking minutes to download megabytes of jar files... so not easy to quickly troubleshoot... I guess a few things to keep in mind: 1. compose-desktop is alpha and is based on jetpack compose which is also alpha (so I guess it is alpha square? 🙂). 2. my point 1. was when I started, and now jetpack compose is beta (so it is only alpha x beta now 😉) 3. things have improved a lot with the release of 0.3.1 and I am not seeing those issues anymore, including working fine on PC (which it wasn't with 0.2.x-buildxxx) 4. I really like the new paradigm of state/composable and it seems hard to go back to event driven model. 5. I am very excited for the future