I saw that Scripting got Focus on the <https://you...
# scripting
s
I saw that Scripting got Focus on the Roadmap, I have being using scripting for couple years I love it but at time there was alot missing things. 2 Major drawbacks was: • the complexity of having easy auto complete in the IDE while creating a custom type that is used out side our project script definition project. You had add the Jar file to IntelliJ in script configuration (that is not really intuitive) to get auto complete and stuff working • Script scope not being able to be
suspend
I want to know if this two things are in the Roadmap as well and what is there is anyplan to resolve the first one.
👀 4
The first one I would have a couple IDEs on how would be nice to use. 1. Support maven dependency + repository on the script definition "jar" list, that some script definition library could publish the definition on maven central and anyone could just put the dependency on the IDE configuration and get auto complete working. 2. Same thing but without being in IntelliJ, maybe a comment on the first line of the script:
// ScriptDefinition: com.github.User:Repository:Version
I think the first solution is more lined with the currently approach. This would be awesome and no IntelliJ plugin just for the Script definition would be required.
Would be awesome as well to have a FileType/FileTemplate/File Create Action for Scripting that list all available Script Definitions that you have configured in IDEA and create a blank file with the proper extension by retriving from
@KotlinScript(fileExtension)
i
Our resources, that we can put into scripting right now are quite limited, so we're trying to solve some more urgent problems in it first, then make non-experimental with the clear documentation and well-defined application area. The drawbacks you mentioned are well known, but unfortunately quite difficult to fix due to various reasons. We are hopeful that with the redesign comping after K2 compiler and appropriate changes in the Kotlin IntelliJ plugin, we will be able to address them easier. But it will take some time. This is especially true for "suspend scripts", this definitely requires a redesign of the scripting support in the compiler. Simplifying custom standalone scripts support in IntelliJ may be partially tackled without major redesign, but is quite difficult by itself, and so far we weren't able to come up with an acceptable solution. We may try to address it someday. But for the time being the best way is to write your own IntelliJ plugin and implement
ScriptDefinitionsProvider
extension point in it.