Skip to content

Conversation

@zobo
Copy link
Contributor

@zobo zobo commented Oct 21, 2023

The build in PHP validation provider sets the Diagnostics Range endCharacter value to Number.MAX_VALUE. This ends up being translated to 1.7976931348623157e+308 in LSP communication with other LSs in the textDocument/codeActionrequest.

There was already a discussion and a fix for related issues: #80288 (comment)

Some parts of the codebase use Number.MAX_SAFE_INTEGER and one uses a hardcoded max 32 bit integer value:

return { startLineNumber: startLine, startCharacter: 1, endLineNumber: startLine, endCharacter: 2 ** 31 - 1 }; // See https://github.com/microsoft/vscode/issues/80288#issuecomment-650636442 for discussion

image

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@roblourens roblourens added this to the November 2023 milestone Nov 1, 2023
@roblourens roblourens enabled auto-merge November 1, 2023 21:27
@roblourens roblourens merged commit 53249fc into microsoft:main Nov 1, 2023
@zobo zobo deleted the fix-php-validation-range branch December 7, 2023 09:13
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants