ferd / ferd/erl_subgraph_compile
Return diagnostics in case of compiler error for integration with Erlang LS
- Dominant language
- Erlang
- Stars
- 9
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
In case of a compilation error, the error is currently printed out via `rebar_api:info/2` and then `rebar_api:abort/0` is called.
From a Language Server perspective, where the plugin is not invoked from command line, but via the Erlang API:
```
rebar3:run(State, ["erl_subgraph_compile", "-f", Filename]).
```
It would be much more convenient to obtain the compiler errors in raw format, so they can be published as [diagnostics](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#diagnostic).
Also see the [els_compiler_diagnostics](https://github.com/erlang-ls/erlang_ls/blob/master/src/els_compiler_diagnostics.erl) module to see how compiler results are currently converted to diagnostics in Erlang LS.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.