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

Type of the id field in response message #159

Closed
muffinmad opened this issue Mar 19, 2021 · 1 comment · Fixed by #160
Closed

Type of the id field in response message #159

muffinmad opened this issue Mar 19, 2021 · 1 comment · Fixed by #160
Assignees
Labels
bug Something isn't working

Comments

@muffinmad
Copy link
Contributor

The type of the id field in server response message is always str now.

The LSP client can't get response for {"id": 1, "method": "initialize} request because pygls will respond with {"id": "1", "result": {...}} and 1 != "1".

Can we please have the id in the response exactly the same as in the request?

@danixeee
Copy link
Contributor

@muffinmad Although this was a bug in pygls, type checking for Unions is not working well in pydantic... I implemented some workaround for now.

@danixeee danixeee self-assigned this Mar 22, 2021
@danixeee danixeee added the bug Something isn't working label Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants