Screenshot 2023-06-13 at 20.31.32.png
# scripting
e
Screenshot 2023-06-13 at 20.31.32.png
i
What's the location of a file? Isn't it in a source root?
e
It is in root of the project
Screenshot 2023-06-13 at 20.51.02.png
I saw warning that it will stop compilation after 1.9
i
It says that it's a source root at the same time
e
Not sure I understood
Screenshot 2023-06-13 at 20.54.14.png
i
Try clicking on this cross
e
Magic! It worked
Means, it was treating it as kotlin script before and just as source?
But it is kts extension
i
If it's part of the module sources then kotlin-main-kts should be present in this module's dependencies. It was not your case. If it's outside of the source roots, separate module is created for this script, kotlin-main-kts is added to it automatically based on file extension
e
Strange not my case, at least I don’t see extra module in project settings. Unless you say it is some invisible module. Let me check iml file or .idea folder
i
By the way, if you're interested in Kotlin scripting, Kotlin Notebook plugin might be also interesting for you https://plugins.jetbrains.com/plugin/16340-kotlin-notebook
e
Thank you! I saw it on the KotlinConf, I didn’t expect it is available already
i
You've created a project with the source root same as the project root. Why it happened - it's another question
e
Oke, doesn’t matter much! It kinda works now
👍 1
Thank you!!!