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 unicode path handling on windows LSPs #2921

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thistle-witch
Copy link

Closes #2920

Tested with Rust analyzer. to_file_path() properly converts file:///c:/... style URIs into properly drive rooted windows paths.

Copy link
Collaborator

@panekj panekj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks lapce

@thistle-witch
Copy link
Author

I'm not sure what you mean by "this breaks lapce"? I tested against the relevant URLs. The handling seemed to be specific to windows file URIs which I tested. No other code was affected.

@panekj
Copy link
Collaborator

panekj commented Jan 15, 2024

Using to_file_path() makes lapce stack overflow

@thistle-witch
Copy link
Author

I'm curious how you got that result. I ran a build of this myself.

@thistle-witch
Copy link
Author

If you have a test project or example URI that causes the stack overflow I can try to find out what is going on.

@panekj
Copy link
Collaborator

panekj commented Jan 15, 2024

The test code is what cargo init gives, typing and deleting println! causes overflow but it doesn't happen in release mode

@thistle-witch
Copy link
Author

It would be helpful if you could provide the exact URI that is causing this issue for you. I have just run a debug build with a cargo init project and do not get the same results at all. To confirm, which version of windows are you using? Its entirely possible this stack overflow is caused by stack size differences.

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.

Unicode path handling not working on Windows
2 participants