-
-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use maxBound of uinteger not Int. #2169
Conversation
Looks like this is a recent change to the spec, from 3.16. I couldn't find a corresponding changelog in the specification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pranaysashank many thanks for fix that disturbing bug
This ensures that we use either: - `Int32` - `Word32` - `Float` In particular, this gets us: - Appropriate `Bounded` instances (see the original issue haskell/haskell-language-server#2169). - More picky `aeson` instances for the bounded types. Rather than use newtypes, we just use the existing appropriate Haskell numeric types for bounded integers. Fixes haskell#354.
This ensures that we use either: - `Int32` - `Word32` - `Float` In particular, this gets us: - Appropriate `Bounded` instances (see the original issue haskell/haskell-language-server#2169). - More picky `aeson` instances for the bounded types. Rather than use newtypes, we just use the existing appropriate Haskell numeric types for bounded integers. Fixes #354.
This is a low effort fix for haskell/vscode-haskell#445 . The lsp spec says
A proper fix would be to create a new type in
lsp-types
for uinteger.Debug info
This check returns
false
https://github.com/microsoft/vscode-languageserver-node/blob/8ad6896d8910214b7a3c8fee8dd175077a743045/client/src/common/client.ts#L1940 and vscode tries to parse it asSymbolInformation
instead ofDocumentSymbol
and you get the error reported in the above issue.The check for uinteger is at https://github.com/microsoft/vscode-languageserver-node/blob/8ad6896d8910214b7a3c8fee8dd175077a743045/types/src/main.ts#L3756