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

serve-d is too strict in LSP enforcement (crashes) #369

Open
gdamore opened this issue Apr 26, 2024 · 1 comment
Open

serve-d is too strict in LSP enforcement (crashes) #369

gdamore opened this issue Apr 26, 2024 · 1 comment

Comments

@gdamore
Copy link
Contributor

gdamore commented Apr 26, 2024

(The other side of this was reported at zed-industries/zed#11060 )

Serve-d crashes when it gets:

{"jsonrpc":"2.0","id":1,"result":null,"error":null}

Essentially according to Postel's Law, we should be a bit more tolerant of reasonable errors.

Clearly the above message can reasonably be interpreted as intended to be:

{"jsonrpc":"2.0","id":1,"result":null}

(Having a null value for "error" is nonsense per the spec, but having a null value is perfectly reasonable as a result from function that has nothing else to return back.)

@gdamore
Copy link
Contributor Author

gdamore commented Apr 26, 2024

To be clear, I'm suggesting treating any message that contains an error value with "null" as if the error is not present at all.

WebFreak001 added a commit that referenced this issue Apr 29, 2024
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

No branches or pull requests

1 participant