microsoft / microsoft/vscode-languageserver-node
Overflow value(exceeding uinteger) passed into jsonrpc but still work
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 404
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 14
Description
The reason is that I found that the fmt feature of my lsp server cannot be used in IntelliJ, but it still work in vscode.
After investigation, I found that I assigned a u32:Max to formatResponse.textedit.range.line in the format's Response
I implemented the lsp server in rust, and u32 was used as the range type in rust's lsp-type, but the range of this value in lsp should be 0-2^31 -1. I think this is the cause of the problem
But I'm not sure whether vscode has special handling for this situation or just forgot to check
https://github.com/redhat-developer/lsp4ij/issues/579
https://github.com/kcl-lang/kcl/pull/1698
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the formatting response with a u32::Max value in formatResponse.textedit.range.line and compare the behavior described for IntelliJ and VS Code. Review the JSON-RPC and LSP range handling to determine the expected treatment of values outside 0–2^31-1, then add regression coverage for the resolved behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100