<https://github.com/Kotlin/KEEP/blob/master/propos...
# scripting
d
https://github.com/Kotlin/KEEP/blob/master/proposals/scripting-support.md#script-parameters Is it currently implemented? The KEEP doesn't mention it as unimplemented, but I can't find such an annotation from the source code of scripting support.
i
Unfortunately there is no implementation of such a feature. But I think it is not too hard to implement it on top of the main-kts or it's simplified variant (https://github.com/Kotlin/kotlin-script-examples/tree/master/jvm/simple-main-kts).
d
Thanks. I just wanted to not reimplement an exisiting feature. As you suggest, I'll implement myself.
👍 1
i
If you'll feel like contributing it, we'll be glad to get it in some form. You can, for example, provide a PR to the simple-main implementation I mentioned above.
d
Do you think the @file:param won't be implemented as a part of the scripting proposal? Anyway, once I have an implementation in place for my project, will try to contribute back to simple main in the examples repo.
👍 1
i
So far we're implementing concrete syntaxes for such features (e.g.
@DependsOn
,
@CompilerOptions
) as examples, and put them into
main-kts
. So it stays outside of the core scripting API. We may consider creating a library of reusable implementations of such feature, so script definition authors can easily add it to their definitions. But I don't see it as a part of the core implementation, because the syntax requirements are different for many cases. If you make implementation for
simple-main-kts
, we can port it later to the
main-kts
as well, and thus make it available for more end-users.
🆗 1