-
-
Notifications
You must be signed in to change notification settings - Fork 22.2k
LSP: Fix file URI handling + warn about workspace project mismatch #104401
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
base: master
Are you sure you want to change the base?
Conversation
82702ce
to
3bcba4e
Compare
Tested this on Windows. I still get the #103565 error about "Hides a global script class" in VS Code, and I see the new warning even when editing the opened project (I launched VS Code from Godot in fact).
|
Thanks for testing! Sounds a bit like Godot could load such paths, but not make them local to the project. I'll spin up a VM and take a look I guess. |
The actual hard part wasn't the leading slash, but dealing with the case insensitive file system. I made some adjustments so that paths should now be correctly mapped to the casing with which they are known to Godot. I did some basic testing in a VM but another round of testing by actual windows users would be appreciated. |
d91d00b
to
46b33a6
Compare
93e60cb
to
88d9098
Compare
I'll mark this as ready for review since I'm done on the code side of things, and my limited testing seemed to work. |
88d9098
to
2f3d6b7
Compare
Fixes #103565
Fixes #92248
Fixes #105000
Might have an influence on:
godotengine/godot-vscode-plugin#649
godotengine/godot-vscode-plugin#650
This PR does two things:
Replaces the file URI handling from the language server with an implementation based on rfc3986 and rfc8089. So that the URI is properly read and decoded.
Do stuff to convert the absolute URI path to a valid res path, taking into account projects in symlinked directories and case insensitive file systems. This should solve a lot of problems with duplicate class name errors when using the language server.
Also adds a warning if the root location of the workspace does not match the project which is open in Godot.
TODO: