HaxeFoundation / HaxeFoundation/haxe
[display] robustness against macro errors in workspace symbols
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
It seems like we should be able to catch macro errors that happen during workspace symbols somewhere (but still print them), to make it more robust? The idea being that since workspace symbols are syntax based, a macro not completing successfully shouldn't be the end of the world - the worst that could happen is that we miss some classpaths added via the `Compiler` API?
Right now, any error will completely prevent workspace symbols from working.
```haxe
class Main {
static function main() {}
static function error()
throw "error";
}
```
```hxml
--macro Main.error()
-cp source
-main Main
--interp
```
```
[Error - 16:50:30] Request workspace/symbol failed.
Message: source/Main.hx:5: characters 3-8 : Uncaught exception error
(unknown) : Called from here
Code: -32603
```

Contributor guide
Assessment
This issue has not been assessed yet.