Open robertoaloi opened 4 years ago
Yep. Will crash on a file that isn't in the DAG, but also on a file that is in the DAG but not on disk (since usually the DAG analysis phase clears all of that stuff up).
Needs handling, unsure what proper error reporting should be like.
From a BSP perspective, I would start by having the build server notifying the client (the language server) of the fact, so that a message can be shown to the user or a log message can be produced. Later on, we could probably check if we can recover from this situation by updating the DAG or similar (if this turns out to be a real issue).
https://build-server-protocol.github.io/docs/specification#log-message
yeah I guess we should differentiate between two types of errors:
I don't think this plugin should be able to fix 2, merely detect the bad conditions. The full range of operations required to fix the DAG are those that lead to a full run, which is considered as too slow to be done inline. But there isn't at this time a good way to figure out "how to do a partial re-analysis that may or may not fix things"; at this point it's all or nothing. Rebar3 compile does the all, this plugin does the nothing.