THIS IS NOT the intellij I know. This is an attack...
# intellij
v
THIS IS NOT the intellij I know. This is an attack on my faith in the holiness of this IDE. That statement was partially a joke but what is not is that I am unable to build my multiplatform proj3ct with intellij and that is not acceptable. In fact it is downright stupid as the app will run on both android and desktop with the run/debug commands but will refuse to build. Does anyone know a way to fix this stupidity from Intellij? And no I cannot accept the workaround of "just use the run button" because kotest does not use the run button, it uses the build command, unless there is a substitute for that. Great KMP template you got here jetbrains, it generates a completely different app layout that does not even work KMP is "stable" 😂
👍 1
👎 7
👎🏾 2
rage1 2
k
Can a mod reach out to this person about the way the treat other people's work in this Slack? Perhaps we should ban them? See previous thread. https://kotlinlang.slack.com/archives/C3PQML5NU/p1697881428480839?thread_ts=1697881428.480839&cid=C3PQML5NU
👍 4
👎 2
👍🏾 1
🍿 3
d
Sounds like PEBKAC to me. Edit: Sorry, shouldn't have said this.
v
I already stated there that my communication was not the best. Here it is different though, I am simply stating that my intellij is acting stupid. I dont think it is fair to get angry at people for saying their IDE is acting dumb
d
"Great KMP template you got here jetbrains, it generates a completely different app layout that does not even work" is directly attacking people.
☝️ 1
v
Company, not people.
d
You think that it was made by a company without people?
☝️ 2
v
also @Daniel Pitts I do not think this is PEBKAC but to make sure, I will try to replicate this with a template with no added dependancies
k
Learn to be professional, Vishnu.
d
Might not be pebkac, and that was probably not appropriate of me to say. I apologize for that comment, I'm having a rough day myself.
👍 3
v
No no, its good to call out pebkac when its there, I take no offense what so ever to it, we are all trying to help each other here
👍 1
d
There are better ways to express these thoughts (for both of us).
In any case, I do suggest trying to build a fresh unmodified template, and make sure that much works.
v
perhaps, for clarity I am using the template from the KMP website, I felt comfortable using this because KMP is stable, which made me think the official template should be as well. I will try the template with nothing and report back
d
I also understand that in moments of frustration you might need to vent, but do keep in mind that there really are people behind these projects and products. I'm sure constructive criticism is appreciated, but sarcasm and complaints are not helpful for anyone.
v
a world without sarcasm is no world to live in my friend.
d
It's all about context. This is a very public forum. One, I might add, which is invite only. Professionalism should be the default voice, and slipping into sarcasm only when appropriate for topic and audience. In this case, it's hard to see how it wouldn't be taken as an insult, and so that's why I think it's not appropriate.
v
I suppose you have a point, I do still need a way to show frustration as this is still a frustrating experience that developers on a stable platform should really not have to go through
I have confirmed this happens on a new project, this is the template
s
Hey @Vishnu Shrikar: As a technical lead for multiplatform I can attest you: I indeed feel uncomfortable and stressed when reading such messages and the communication style is certainly not my preferred one, but I feel like you got plenty of rights to complain about your experience! Not being able to just execute the code from this little ‘run button’ next to you main method really sucks and I am very frustrated that this happened to you. I checked on IntelliJ and it works there (instead of Android Studio), so you might want to give IntelliJ a shot? Now maybe you’re wondering how something stupid like this can happen in production? If I am frustrated by it, why would I not just ‘go and fix it’? Let me provide some technical insights on how this bug happened as I feel like its somewhat interesting: Step 1: Ide Dependency Resolution: Resolving dependencies for the IDE in multiplatform is much more complex than you might anticipate. Have a read in all the dependency resolvers: https://github.com/JetBrains/kotlin/tree/master/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/ide Step 2: Omission of runtime dependencies. In order to simplify and speedup dependency resolution for the IDE we omitted importing ‘runtime dependencies’. What is a runtime dependency for common/shared code anyways? This concept poorly translates to multiplatform. Step 3: IntelliJ run configurations Usually IntelliJ executes jvm code by compiling (mostly with Gradle) and then running it using a process started within the IDE. It uses runtime dependencies to infer the classpath 🌩️ Step 4: We found out about this issue https://youtrack.jetbrains.com/issue/KT-44794/java.lang.NoSuchMethodError-error-for-Compose-generated-code-at-runtime We therefore implemented a ‘run carrier task’ that allows the IDE to instrument Gradle quickly and execute code: https://youtrack.jetbrains.com/issue/KT-58661/KGP-KotlinJvmTarget-Implement-run-carrier-task Step 5: Android Studio vs IntelliJ vs IntelliJ Kotlin Plugin. Now the support for executing code this way was implemented in the Kotlin IDE plugin and seemed to work fine inside IntelliJ. However, we do not have sources of Android Studio /master at our hands, nor can we quickly try this out. Step 6: Now when Android shipped this run carrier task (months later), we saw that it is not working in Android Studio https://youtrack.jetbrains.com/issue/KTIJ-27797/Android-Studio-Support-Multiplatform-jvm-run-carrier-task The reason: The run configuration in IntelliJ uses knowledge about Gradle tasks that are not available inside Android Studio (they omit it as optimisation). Now here we are; Run gutter being broken in Android Studio, timing is not comfortable. We already work close with Google on resolving this issue. I hope I was able to restore some of your faith in fellow engineers. Thanks
👏 3
thank you color 1
❤️ 1
v
Hello I want to say the "build" button does not work, the run button works juts fine. I am using intellij Ultimate, not android studio, that is why I am stating the stupidity is coming from intellij, as in the running instance of my intellij IDE. The problem with the build system not working is that Kotest basically breaks due to this. Even if I can hackjob the build button to work and get kotest working from a gradle task, I cannot run individual tests and the plugin just crashes no matter what. The error that I got originally was the same as the build error which is why I decided to complain about that as it was the source most likely. Your technical breakdown is SUPER appreciated as it explains a lot and matches some of my own research that I have done on this issue. Thanks for going and writing that up for me. I want to clarify that when I call my intellij stupid, or whatever, I am referring to the current instance of my intellij computer program, not the company and NEVER the people who work at it. I did use sarcasm in that post because this situation is a perfect storm of frustration. The announcment that KMP was stable is why I wanted to use the new templates in the first place and along with that, using random templates from outdated tutorials was causing me grief so an "official" solution looked like it could solve all my problems. The other thing is that I am using intellij ultimate. This is not a free open source library made with someone's free time but rather a paid product that is locked behind a subscription. This is an important distinction and influenced why I chose a hardline approach on this. As an update I am now simply attempting to map the test task to desktopTesting. This is .... annoying to deal with but I can now run desktopTests with kotest but cannot run individual tests, if you have any intellij specific tips for fixing this issue I am all ears. One question I have is why do the github templates not run into this issue but yours do? Are there differences that. I can hack job in that can fix this?