ferd / ferd/erl_subgraph_compile

Return diagnostics in case of compiler error for integration with Erlang LS

Open
#4 2 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.