JG
03/05/2025, 5:50 PMJG
03/05/2025, 5:51 PMJG
03/05/2025, 5:57 PMmodule
as <package_name>.common
for some reason and changing it to ``<package_name>.jvm` makes the Run
button work (although the Kotlin icon is still greyed out).joffrey
03/05/2025, 5:58 PMmodule.yaml
or automatically discovered by looking at files named main.kt
).
The fact that multiple ones worked before in IDEA was rather a happy accident. Now IDEA delegates the execution to Amper, which therefore can only run your "main" main
function.joffrey
03/05/2025, 5:58 PMjoffrey
03/05/2025, 5:59 PMjvm/app
modulesJG
03/05/2025, 6:00 PMmain
function also does not seem to work though. the only thing which works is selecting the run configuration with the amper icon.JG
03/05/2025, 6:01 PMJG
03/05/2025, 6:03 PMIf you need multiple entry points you can extract those main classes to separateyou should really see how Rust (Cargo) does multi-executables. in the same config file you can define as many entry points as possible as opposed to amper requiring to split the yaml file and the whole project. really sad 😞modulesjvm/app
JG
03/05/2025, 6:04 PMJG
03/05/2025, 6:08 PMjoffrey
03/05/2025, 6:47 PMbut far behind cargo in terms of intuitiveness and ease of useIf you have specific UX issues or improvements suggestions, I'd be really happy to hear them. We're trying to be user-oriented and use-case oriented in the design, and it is super helpful to get direct feedback with real-life cases
joffrey
03/05/2025, 7:05 PMthis project is basically a replacement for the barely supported kotlin scripts, so it has tens of files, each one with a main function and amper is used just for managing dependencies
you should really see how Rust (Cargo) does multi-executables. in the same config file you can define as many entry points as possible as opposed to amper requiring to split the yaml file and the whole project. really sadCould you please describe your use case for multiple entry points? How exactly are you planning to use them? Do you intend to create actual binaries, or just run from the IDE?
JG
03/05/2025, 7:12 PMJG
03/05/2025, 7:14 PMJG
03/05/2025, 7:16 PMJG
03/05/2025, 7:17 PMJG
03/05/2025, 7:20 PMjoffrey
03/07/2025, 3:21 PMmain()
function > extract to new module (this feature doesn't exist yet, but is a very real possibility for Amper)
• running different entrypoints from the IDE could be made very smooth with run config2 buttons in strategic places
• the file hierarchy in itself might be considered visual clutter, especially with the src/main/kotlin
convention from Gradle. In Amper, it's much shallower (just <moduleDir>/src/main.kt
). There is still some inherent inconvenience here, albeit smaller.
Understanding what you mean by the maintenance burden (with your real life cases) would help a great deal here.
Aside from these pain points, what really interests me is how you run these different binaries from your project. Do you run them from the IDE or from the CLI? Do you use them to perform local tasks only, or do you distribute these as applications to other users? In the latter case, do you package/publish one binary with several commands, or one downloadable package with multiple binaries inside, or multiple independent packages that users can download separately?abarsov
03/14/2025, 12:53 PMHowever, on the latest Intellij EAP/Beta (not sure when exactly this broke), Intellij shows a run icon beside the main function in these individual files but clicking on that does absolutely nothing.
The presence of a non-working play button in the gutter is a bug, though. There should be no run button for main functions that are not technically the one recognized by AmperThis issue is fixed in release branch, the fix will be available in 2025.1.1 (not sure about 2025.1)