dylan-lang / lsp-dylan

Language Server for Dylan (alpha)
MIT License
8 stars 2 forks source link

eglot: result parameter may be wrong #21

Closed pedro-w closed 1 year ago

pedro-w commented 1 year ago

The server should reply to a hover message with the appropriate JSON data or null if the cursor is not over a known identifier. The dylan code is of the form

let result = if (...known identifer?...)
        ...the data...
    end if;
...return result...

and if it is not a known identifier, result is #f which is serialized to JSON false when it should be null. Other message results may be affected by the same thing. VSCode and lsp-mode did not complain but eglot does.

pedro-w commented 1 year ago

I checked the other supported protocol responses and none are affected like this. Not possible to make #f into JSON null 'globally' (i.e. when the JSON message is prepared and sent) because at least one message returns LSPAny which could include null or false