microsoft / lsprotocol

Code generator and generated types for Language Server Protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`long` instead of `uint` to represent LSP `uinteger` type

karthiknadig opened this issue · comments

This is for C# specifically. The reasoning here is that C# internally uses only int and long types. uint is not a real C# type.

@dbaeumer What do you think of this? I feel this is problematic. In the case of DAP with python we pretty much broke the debugging experience due to IDEs not handling out of the uint range. So, I am assuming similar problems will surface with LSP.

This is of course tricky since in JS you can always create object literals inline bypassing all possible checks. However in cases were the API is used I did add checks. See https://github.com/microsoft/vscode-languageserver-node/blob/07b9d293ea775dfd263562da3e8321d40397a3d0/types/src/main.ts#L213