Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overflow value(exceeding uinteger) passed into jsonrpc but still work #1574

Open
He1pa opened this issue Oct 18, 2024 · 3 comments
Open

Overflow value(exceeding uinteger) passed into jsonrpc but still work #1574

He1pa opened this issue Oct 18, 2024 · 3 comments
Milestone

Comments

@He1pa
Copy link

He1pa commented Oct 18, 2024

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

redhat-developer/lsp4ij#579
kcl-lang/kcl#1698

@dbaeumer
Copy link
Member

VS Code doesn't currently have checking code for this.

@dbaeumer dbaeumer added this to the Backlog milestone Oct 18, 2024
@rcjsuen
Copy link
Contributor

rcjsuen commented Oct 25, 2024

I ran into this as well. If VS Code detects this what should it do? 🤔

@dbaeumer
Copy link
Member

The only way how we could handle this is IMO by returning it as a Response error and then report it on the other side via an Error.

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

No branches or pull requests

3 participants