Coming from this thread in <#C063G2ZBF8V|fleet> <h...
# amper
s
Coming from this thread in #fleet https://kotlinlang.slack.com/archives/C063G2ZBF8V/p1717498184815679?thread_ts=1717497850.141899&amp;cid=C063G2ZBF8V where we discussed the minimum required work for one to be able to write some Kotlin scripts while also getting proper IDE support for Kotlin. I wonder, could Amper solve this problem here? Or does it perhaps already do that and I don't realize how to get that working? My hope is that I can create a directory with one
main.kts
file in there for the script. And in the same level an Amper config file specifying something like 1 line
product: script
. And then we'd be able to both get autocompletion in the script + be able to bring in dependencies. Is this something that is already possible? If not, do you think this would fit Amper? If yes I can file a feature request for it.
👍 1
c
Isn't this mostly a tooling issue? You can already declare dependencies in
.main.kts
, right? The IDE doesn't handle it correctly at the moment, but there shouldn't be any more work needed from the user, no?
s
Yes, a tooling issue indeed. The fact that I need to add Gradle related things in my directory so that the IDE can help me out isn't the best experience. And since it looks like there must be something there, maybe one like of Amper would be a much preferred thing instead
a
Hi, Stylianos! Indeed, this a Fleet limitation. Currently, a single Kotlin script file is not treated by Fleet as it should, so the smart autocompletion is not available. So this would not be possible to fix by configuration, in another build tool.
l
Hopefully FL-22261 gets prioritized.
🌟 1
s
Currently, a single Kotlin script file is not treated by Fleet as it should, so the smart autocompletion is not available. So this would not be possible to fix by configuration, in another build tool. (edited)
But if you do the workaround as explained inside the issue, and Fleet adds the necessary gradle files this works right? Couldn't Amper be the one which does the same setup which would enable it in the same way?
g
I really don't think that script setup is something to do with build system (Gradle or Amper), it's tooling issue which must be fixed on Fleet/Idea level, to support .main.kts script definitions And for custom script definitions it is probably should be done also on level of IDE, by specifying location of Script definition
1
Honestly I feel that scripting support is not so good because scripting itself is on KEEP stage and was not in active development, maybe now with K2 work will continue
s
a bit out of context, if you want watch a bit before to get the question too https://youtube.com/clip/UgkxYnXiev4Q66U-KsHfuEjjgMeCDRmOAVmw?si=Czz4ORN2ZQjDhPOW but the tl;dr is that I don't think scripting will receive any love even after k2 properly lands.
l
That's so sad
g
"continue to maintain and support", I think it's not what is happening now, when it stuck in a limbo, when none of features of it are stable, and supported only what was required for Gradle KTS to work and a few early not complete prototypes like main.kts I think it would be great to actually implement KEEP and support on IDE level