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

Lowercase drive letter in URIs for Windows #1441

Merged
merged 4 commits into from
Dec 21, 2023

Conversation

corben2
Copy link
Contributor

@corben2 corben2 commented Jun 29, 2023

Description

If a LSP client on Windows sends a capital drive letter in a URI, then the compiler diagnostics end up sending the wrong position/range.

This is because of this line. It checks that the path from the compiler matches the URI path. The path from the compiler has a lowercase drive letter, so they don't match and the diagnostics are treated as if they are coming from an include.

I've fixed this in els_uri:path, but there might be a better place to do it, I'm not sure.

@plux
Copy link
Contributor

plux commented Dec 21, 2023

Thanks for your contribution @corben2 !

@plux plux merged commit 7801b22 into erlang-ls:main Dec 21, 2023
shuying2244 pushed a commit to shuying2244/erlang_ls that referenced this pull request Dec 30, 2023
If a LSP client on Windows sends a capital drive letter in a URI, then the compiler diagnostics end up sending the wrong position/range.

This is because of this line. It checks that the path from the compiler matches the URI path. The path from the compiler has a lowercase drive letter, so they don't match and the diagnostics are treated as if they are coming from an include.

I've fixed this in els_uri:path, but there might be a better place to do it, I'm not sure.
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.

2 participants