The profiling feature recently added to the Preloader has broken the kotlin-script CLI tool. It's easily fixed/worked around, but it's not clear whether the bug is in the documentation or the implementation.
The usage message for the Preloader states that the
time|notime argument should be last:
Usage: Preloader <paths to jars> <main class> <class number estimate> <parameters to pass to the main class> <time|notime>
But the code expects it to be fourth (args). As a result, it barfs when it receives a
-module argument in that position from kotlin-script.
I’ve patched kotlin-script locally to add a
time/notime argument in the required position, but I don’t want to propose it as a fix if it’s temporary or if it’s going to be moved to the end as per the usage message.