Skip to content

Cannot run code when opening just a single file #151

Description

@jiribenes

Originally reported by @LeoZieger

Repro

Open a file test.effekt in a new folder, never before seen by VSCode:

FOLDER=$(mktemp -d); cd $FOLDER; code test.effekt

Then put the following into the file:

def main() = println("Hello world")

and click the |> Run button above the main.

The output of the above is an error:

Variable workspaceFolder can not be resolved. Please open a folder.

Context

Everything works fine if you open the enclosing folder, only then create the file in VSCode.

We do seem to use workspaceFolders (plural) in a number of places: https://github.com/search?q=repo%3Aeffekt-lang%2Feffekt-vscode%20workspaceFolder&type=code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions