effekt-lang / effekt-lang/effekt-vscode

Cannot run code when opening just a single file

Open
#151 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
5
Forks
5
PR merge metrics
No merged PRs in 30d

Description

_Originally reported by @LeoZieger_

### Repro

Open a file `test.effekt` in a new folder, never before seen by VSCode:
```sh
FOLDER=$(mktemp -d); cd $FOLDER; code test.effekt
```

Then put the following into the file:
```effekt
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.