vscode-kotlin icon indicating copy to clipboard operation
vscode-kotlin copied to clipboard

Documentation should mention user has to "Open Folder"

Open mooffie opened this issue 4 years ago • 0 comments

The documentation says "To use, open a Kotlin file inside a Gradle or Maven project" in bold letters. But the user may not understand that it means to Open Folder (or a Workspace).

This is especially true when no Gradle/Maven project is involved, as when using kotlinc directly for small scripts (in such case the user may launch the editor by doing "code hello.kt", which is wrong).

Unless the user does Open Folder, she'll get such messages:

  • "Unresolved reference: println"
  • "Cannot access built-in declaration '????'. Ensure that you have a dependency on the Kotlin standard library".

(That's because CompilerClassPath::addWorkspaceRoot(), which calls defaultClassPathResolver(), isn't triggered.)

mooffie avatar Nov 30 '20 14:11 mooffie