-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emacs ParseRequest error, no no such file when switching branches #18
Comments
@tsloughter Thanks for reporting. This is a known issue where the file, as you realized, gets deleted on the file system but the client (Emacs in your case) still has an open version of the file in the editor and ELP tries to compute diagnostics for it by reading a non-existing version from the file system (in general we compute diagnostics from the source of truth - which is the version showed in the editor -, but there a couple of exceptions). The error is harmless in the sense it does not affect the functioning of the language server, but it pollutes the logs un-necessarily. We also have some planned work where we pass the original text so we don't read it from the file system. Will try to prioritize this. |
@tsloughter We decided to try and fix this in the "proper" way. This means we will have to introduce a bi-directional channel between ELP and the "Erlang Service" sidecar, so that the Erlang Service can operate on the source of truth for the file and not read from the file system. But this requires quite a bit of plumbing, so it will take a while before we can address this. |
Describe the bug
When I have a buffer open with, in the below example,
otel_ctx.hrl
, it then switch git branches to one without the file this error is given:To Reproduce**
Open a file, switch to a branch that the file doesn't exist.
Expected behavior
No crash of the
elp_erlang_service
Actual behavior
elp_erlang_service
crashes on aParseRequest
error.Context
elp version
): elp 1.1.0+build-2024-02-16The text was updated successfully, but these errors were encountered: