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

Eglot Bash Language Server: Eglot shouldn't error so strongly when given invalid range objects #597

Open
iris-garcia opened this issue Jan 21, 2021 · 8 comments

Comments

@iris-garcia
Copy link

Emacs becomes almost unusable, I can see this error messages:

error in process filter: eglot--range-region: Wrong type argument: number-or-marker-p, nil
error in process filter: Wrong type argument: number-or-marker-p, nil
error in process filter: eglot--range-region: Wrong type argument: number-or-marker-p, nil
error in process filter: Wrong type argument: number-or-marker-p, nil
(:jsonrpc "2.0" :method "window/logMessage" :params
          (:type 4 :message "onDocumentHighlight 83:0 "))
[server-reply] (id:21) Thu Jan 21 10:07:19 2021:
(:jsonrpc "2.0" :id 21 :result
          [(:range nil)
           (:range nil)
           (:range nil)
           (:range nil)
           (:range nil)
           (:range nil)
           (:range nil)
           (:range nil)
           (:range nil)
           (:range nil)
           (:range nil)
@joaotavora
Copy link
Owner

Hello, thanks for reporting this. It seems the server is replying to something with invalid results and Eglot isn't being robust enough to handle that. So this is definitely a bug in Eglot and in the bash language server. But it would be nice to have more of that transcript...

@joaotavora
Copy link
Owner

Presumably easy to fix on the Eglot side, so adding the "help wanted" label, as I don't have much time right now.

@iris-garcia
Copy link
Author

I'll try to debug this, but my elisp knowledge is very limited, lets see how far I get.

@joaotavora
Copy link
Owner

For starts, M-x toggle-debug-on-error will help a lot

@iris-garcia
Copy link
Author

After a day debugging this, I found out I didn't have the latest version of the Bash Language Server, updating to the latest version seems to fix this issue, I guess we can close the issue for now, sorry :(.

@joaotavora
Copy link
Owner

Yes, I don't mean to belittle your effort (one full day, I'm so sorry :-) ), but it was clear that this is a server problem. However, Eglot should behave more responsibly when given this invalid data, and this is why I am reopening.

@joaotavora joaotavora reopened this Jan 22, 2021
@joaotavora joaotavora changed the title Eglot Bash Language Server Eglot Bash Language Server: Eglot shouldn't error so strongly when given invalid range objects Jan 22, 2021
@iris-garcia
Copy link
Author

No worries, I really want to get into elisp, I just find it hard to learn (coming from OOP). But I'll install again the old Bash Language Server and try to handle this invalid data in a better way.

@skangas
Copy link
Collaborator

skangas commented Jan 9, 2022

@iris-garcia Did you get anywhere with this?

Could you tell us which version of the bash language server caused this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants