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

fix: normalize LSP request URIs. #231

Merged
merged 4 commits into from
Oct 21, 2024

Conversation

peterhuene
Copy link
Collaborator

@peterhuene peterhuene commented Oct 21, 2024

This fixes LSP requests that contain percent encoded colons and
lowercase drive letters in request URIs.

This caused the analyzer to report an empty set of diagnostics on Windows because
the requested document was unknown to the analyzer (it uses both a colon
and an uppercase drive letter in the document graph).

The fix is to percent decode the path segments and normalize the drive
letter to uppercase in the LSP server.

Fixes #229.

Before submitting this PR, please make sure:

  • You have added a few sentences describing the PR here.
  • You have added yourself or the appropriate individual as the assignee.
  • You have added at least one relevant code reviewer to the PR.
  • Your code builds clean without any errors or warnings.
  • You have added tests (when appropriate).
  • You have updated the README or other documentation to account for these
    changes (when appropriate).
  • You have added an entry to the relevant CHANGELOG.md (see
    "keep a changelog" for more information).
  • Your commit messages follow the conventional commit style.

This fixes LSP requests that contain percent encoded colons and
lowercase drive letters in request URIs.

This caused the analyzer to report an empty set of diagnostics because
the requested document was unknown to the analyzer (it used both a colon
and an uppercase drive letter in the document graph).

The fix is to percent decode the path segments and normalize the drive
letter to uppercase in the LSP server.

Fixes stjude-rust-labs#229.
@peterhuene peterhuene force-pushed the fix-windows branch 2 times, most recently from be489d7 to 358388b Compare October 21, 2024 06:19
@peterhuene peterhuene merged commit 36f0f30 into stjude-rust-labs:main Oct 21, 2024
12 checks passed
@peterhuene peterhuene deleted the fix-windows branch October 21, 2024 17:01
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

Successfully merging this pull request may close these issues.

LSP: diagnostics for files opened in the editor are not updating correctly on Windows
2 participants