Open gabrielfeo opened 1 year ago
Yes, your comment is entirely valid. My ultimate goal is to switch to Kotlin scripting backend while keeping all the excellent features of KScript (like interoperability with shell, caching, etc.). The only question is how much effort to put in to stay perfectly compatible, while in the long run, I will switch to Kotlin scripting anyway. Currently, in my opinion, it is not worthy of effort, as I would like to switch to the Kotlin scripting backend after version 4.2, which I am about to release. But still, if anyone wants to improve KScript with such features, I am happy to apply patches.
It'd be great if kscript could match behavior to be 100% compatible with the 'Kotlin scripting support' annotations. Even if one writes a script aiming for the standard compiler command, I could run it with kscript and benefit from caching and its other features.
vararg
supportAdding multiple repositories with a single annotation (source):
but kscript doesn't support vararg in
Repository
, parsing the second arg as a repository username:Line break support
Breaking line inside annotations is supported by kotlinc, but isn't supported by kscript:
Line break in DependsOn
Line break in Repository
Note: using multiple Repository and DependsOn annotations has the same behavior in both kotlinc and kscript, a good workaround to make scripts compatible with both