Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Support string 'ID' Fields #805

Closed
ggilmore opened this issue Apr 2, 2018 · 2 comments
Closed

Support string 'ID' Fields #805

ggilmore opened this issue Apr 2, 2018 · 2 comments

Comments

@ggilmore
Copy link

ggilmore commented Apr 2, 2018

I noticed a comment here: https://github.com/rust-lang-nursery/rls/blob/a793188fd8021ff6ec2779d6f8fa3dea3bc13ad4/src/server/message.rs#L116-L138, but I thought that I'd make an issue to track it.

LSP supports arbitrary strings as the ID for a given request, but numbers are the only supported type in RLS. It'd be great if RLS were able to fully adhere to the protocol in this aspect.

@nrc
Copy link
Member

nrc commented Apr 5, 2018

This was previously discussed in #360. Note that we do support, e.g., "42" as an id (which we believe is the intent of the spec) as well as 42, but not "foo".

I'd not be opposed to supporting all strings, but as far as I know this is not supported by any clients, so it is so low priority that it is not worth tracking. If it ever becomes a real issue, I'd be happy to track it then.

@nrc nrc closed this as completed Apr 5, 2018
@keegancsmith
Copy link

The spec does not allude to the ID being a number, only that the response JSON uses an identical id field http://www.jsonrpc.org/specification#request_object Discussion on the JSON-RPC

FYI Sourcegraph is a client of LSP and we use arbitrary strings as ID's.

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

No branches or pull requests

3 participants