You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using int.high, and in the case of a 64-bit system (which is common on most computers today), this will lead to an overflow, causing some language clients to fail.
For example, in Zed, I received the following log:
Caused by:
0: failed to deserialize response
1: invalid value: integer `9223372036854775807`, expected u32 at line 1 column 77
[2024-12-10T16:00:34+01:00 ERROR lsp] failed to deserialize response from language server: invalid value: integer `9223372036854775807`, expected u32 at line 1 column 77.
The text was updated successfully, but these errors were encountered:
Follow the spec in here: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#uinteger
uinteger: Defines an unsigned integer number in the range of 0 to 2^31 - 1
Do we do the wrong type for
uinterger
, it should be uint32?https://github.com/nim-lang/langserver/blob/master/protocol/types.nim#L12
As a result, we encounter failures when executing the command format, as shown here: https://github.com/nim-lang/langserver/blob/master/routes.nim#L700
We are using
int.high
, and in the case of a 64-bit system (which is common on most computers today), this will lead to an overflow, causing some language clients to fail.For example, in Zed, I received the following log:
The text was updated successfully, but these errors were encountered: