-
Notifications
You must be signed in to change notification settings - Fork 137
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
Doubly-unescaped URI causing workspace to be ignored #655
Comments
Thank you for the report, it looks like we encode the URI twice somewhere. At least that is my guess since |
@CraigStuntzWillowTree can you post a short example folder structure? It looks like the VS Code terminal prompt shows |
Regarding I am using macOS 11.6. I have changed the default shell to fish. A short example folder structure (edited for length):
|
Hmm, no, I just looked at the folder name in Finder and it's literally |
Thanks for finding that out, that explains where the initial encoding is coming from. I'm not sure there is something for us to do here, we can't know to un-encode the space so we can re-encode it to a URI later. We might have to think on this. |
FWIW I was able to reproduce this by creating and opening a folder with literal I believe the likely root cause here is that we unescape paths after parsing the URIs in the language server: terraform-ls/internal/uri/uri.go Line 48 in 8840e7b
I'd need to do a bit more testing, but I'm guessing that Either way this error is coming from LS which is where we may be able to fix it, so I'm going to transfer the issue there. |
We made some significant changes to how URIs are parsed as part of #771 This means that we should no longer be double-escaping or double-unescaping any URIs. That said URI escape sequences such as That said the language server can now provide IntelliSense within the module, assuming that is a stand-alone module which - for any reason - still has |
This functionality has been released in v0.26.0 of the language server. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Versions
This bug is reproducible in:
Extension
Language Server
VS Code
Operating System
Terraform Version
Steps To Reproduce
Run VS Code.
See dialog box pop up with the error displayed.
The folder does exist (see screenshot). However, the displayed path is incorrect
%2520
instead of%20
Expected Behavior
No error
Actual Behavior
Error displayed.
The text was updated successfully, but these errors were encountered: