Skip to content
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

Do not read file from disk on didOpen #1298

Merged
merged 1 commit into from
May 13, 2022

Conversation

robertoaloi
Copy link
Member

According to the specs the language server should not try to access the file from disk:

The server must not try to read the document’s content using the document’s Uri.

Erlang LS erroneously does that. This can cause a server crash if the file is not available in the location specified by the Uri.
Using app as default source since the only side effect is to index references and signatures for the document, which is not a big problem if it is done also for a dependency or a file which is part of OTP.

Fixes #1296

@robertoaloi robertoaloi merged commit 2dfb48a into main May 13, 2022
@robertoaloi robertoaloi deleted the do-not-read-from-disk-on-did-open branch May 13, 2022 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected errors on didOpen and didChange, LSP entirely not working.
2 participants