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

Workaround the drive letter casing issue on windows. #747

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

raldone01
Copy link

@raldone01 raldone01 commented Dec 5, 2024

Fixes: #726.

Lower case drive letters seem to be the cause of the issues.

Not being able to refactor on windows makes clangd borderline unusable.

The workaround can be removed once clangd/clangd#108 is fixed.
In the mean time I think this simple workaround should be quite robust and alleviate the pain.

Why I fixed it here:

Working around the clangd issue in the vscode extension is much easier than attempting to tame the beast that is clangd.
The impact of the workaround is also very small.

Some things I am uncertain about:

I don't know if clangd normalizes paths at all.
If it doesn't:

Maybe a setting should be added to decide between upper and lower case drive letter normalization on windows.
I have never observed lower case ones in compile_commands.json though.
So we should probably wait for complaints 😁 before adding the setting.

Note:

I changed the typescript target because I needed named capture groups.
Maybe it is also time to move on from commonjs to "module": "Node16",.

@raldone01 raldone01 marked this pull request as draft December 5, 2024 16:28
Bump from es6 to `ES2022` as is recommended in the current vscode extension template.
@raldone01 raldone01 force-pushed the workaround/windows_drive_letter_casing branch from b25d08d to 55c6e58 Compare December 5, 2024 16:47
@raldone01 raldone01 marked this pull request as ready for review December 5, 2024 16:48
@raldone01 raldone01 force-pushed the workaround/windows_drive_letter_casing branch from ef96d20 to 59bfeb1 Compare December 5, 2024 17:22
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.

Rename failed to apply edits.
1 participant