Documentation/code mismatch in the Preloader


#1

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[3]). 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.


#2

This is a bug in the usage message. The parameter should go in the fourth position.


#3

OK. Thanks.


#4

Hi there. I'm the author of the kotlinscript project. Sorry I haven't merged your pull request for your previous fix. I'm currently on leave in another continent using a phone for internet access.

I’ll be back in a week and will test and merge your fixes and updates.

Cheers
Andrew


#5

Fyi I've just merged your changes on the assumption they work. :)

It  seemed the better option given the preloader change was breaking. I’ll verify next week. Thanks for your pull requests.

Cheers
Andrew


#6

Thanks :-)