I'm curious why the latest template app has switch...
# compose-desktop
m
I'm curious why the latest template app has switched from
desktopMain
to
jvmMain
as a source set. It feels like this has switched back and forth over time and I don't quite understand why.
👀 2
s
👋 Hey, I was mostly arguing in favor of removing the 'desktop' target name. Let me try to provide the reasons as good as I can do in as little text as possible. We all agree that naming is hard and we could have long and interesting debates about the name 'jvm' vs 'desktop' for a target used by KMP in compose. While I like the name 'desktop' and all its implications there is another issue which has nothing to do with the name on its own! Using any 'non default' as a target name comes with significant costs: Convenient "source set accessors" (e.g.
kotlin.sourceSets.jvmMain
) will not work Many task names created by plugins will be different (e.g.
jvmRun
vs
desktopRun
). Copy-Paste in buildscripts is harder when not using defaults Overall, I have seen many users getting frustrated by trying to run their project using
jvmRun
and I had hard times explaining that the
{targetName}Run
naming schema. The Kotlin Build model is really not intuitive (I wish it were), but the fact is: It is not! And using just the default name for the target
jvm
has significant benefits for beginners. Advanced users can always choose to give their target a custom name and they will know that this might change task names
❤️ 7
💯 1
g
I personally don't like old "desktop" semantics, Desktop could be also native or js Same way as Android is android and iOS is ios, none of them are "mobile" or "phone , because you can create not only mobile and not only phone apps
m
Hmm, I never use
jvmMain
, always just
main
in my JVM projects. Anyway, I understand the reasoning but I had to do a fair bit of busywork last night because of this name change so ideally please don't change it again!
s
@mikehearn: Are you often working with the wizard or relying on its output?
m
My company makes Conveyor, a tool for shipping desktop apps that has deep Compose support. Part of that support is that it can generate a template starter app with integrated support for deploying with Conveyor, and so as part of that we have a cron job that downloads from the wizard, patches the output, and updates the starter app. Small changes can be applied automatically but this one required big changes because it renamed all the build targets, that appear in various places in our codebase as part of the testing system.
👍 1
s
Got it! Makes sense. There are no plans to change it again.
m
Great.
c
conveyor is the goat. learned about it via https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-native-distribution.html#gradle-plugin glad to see everyone on the same page!
❤️ 1
m
Could anybody please translate “conveyor is the goat” for a non-native English speaker 🤔.
e
GOAT = Greatest Of All Time
🙏 1
d
"the goat" is something of a slang term. Eliezer has given the correct definition. Basically, its just a way of saying "This is great and I like it".
🙏 1
m
Uhhh! Capitalization would have helped to realize that this is an acronym.
👍 1
d
Yeah, its become slangified, so despite its origin as an acronym, that's not really how its thought of in general any more. Language evolution is an interesting thing.
m
Have mercy with us foreigners. Last time a read this term is was in conjunction with some political leader and is was not meant as an acronym.
plus1 1
d
I'm over 40, so it was a learning curve for me, despite being US native
😀 1
c
fwiw. im not a native english speaker. i just picked it up and love using that term.
m
the goat is the goatest term of all time. I agree netspeak is puzzling but it was ever thus. Who here remembers books in the local library explaining terms like "newbie" and "a/s/l" 😆
m
Sorry, couldn’t resist: https://x.com/i/status/1957428145109475807 Click on the video.