At what point, and why, did KTS files start needin...
# scripting
d
At what point, and why, did KTS files start needing to be named
.main.kts
to be recognised for execution? It's a bit of an annoying naming restriction TBH Was it necessary? Previously any plain
.kts
name could be executed.
e
did it ever? I only remember third-party tools like kscript supporting that, not Kotlin itself
the subtype is there because scripts can have different definitions
j
I think the
main
name is to allow calling it with
kotlin foo.main.kts
, without
main
, it was not working,
kotlin foo.kts
e
exactly.
main.kts
is one that is provided in the compiler distribution,
gradle.kts
is one provided by Gradle, etc.
đź‘Ť 1
today i learned 2
d
Its probable I confused this because of earlier using kscript, as you said @ephemient