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] Uppercase UNC host names on Windows #1865

Open
AnrDaemon opened this issue Jul 7, 2021 · 4 comments
Open

[Workaround] Uppercase UNC host names on Windows #1865

AnrDaemon opened this issue Jul 7, 2021 · 4 comments

Comments

@AnrDaemon
Copy link

Feature description or problem with existing feature
microsoft/vscode#112231
This happens because Intelephense (in particular) opens symbol definitions with UNC host lowercased, which causes brain split in VS Code, which consequently causes all sort of headache, from inability to set breakpoints in source to two Git scans running in parallel over a slow network link.

Describe the solution you'd like
Yes, this should be fixed in VS Code itself, but until then…
If you detect an UNC name, the host part should be uppercased to avoid brain splits.

Additional context
See linked issue.

@AnrDaemon AnrDaemon changed the title Uppercase UNC host names on Windows [Workaround] Uppercase UNC host names on Windows Jul 7, 2021
@Seldaek
Copy link

Seldaek commented Jul 15, 2021

Related to this, UNC paths like \\wsl$\Ubuntu-20.04\var\www\foo.php seem to be opened (by go to definition) as a relative path Ubuntu-20.04\var\www\foo.php which makes the editor (sublime text in my case) open \\wsl$\Ubuntu-20.04\var\www\Ubuntu-20.04\var\www\foo.php which clearly doesn't work as it contains some part of the path twice.

I'd be happy to look into the issue but seems like intelephense isn't quite open source?

@bmewburn
Copy link
Owner

@Seldaek Are you able to provide a trace of the definition request so I can see what the URI of the file is?

@Seldaek
Copy link

Seldaek commented Jul 15, 2021

In the sublime text console I see smth like this:

Unable to open /?wsl$/Ubuntu-20.04/var/www/x/src/X/Ubuntu-20.04/var/www/x/src/X/DoctrineTrait.php

Not sure how to get you a lower level trace, but happy to give it a shot if you have instructions.

Just to be clear about my situation: I have sublime text running on windows and files stored in WSL2 filesystem.

@AnrDaemon
Copy link
Author

AnrDaemon commented Aug 9, 2021

Simple reproduction:

  1. Install https://github.com/bmewburn/vscode-intelephense/releases/tag/v1.7.1
  2. Open workspace from an UNC path.
  3. Open file src\Wrappers\PDOMysql.php.
  4. From class declaration, position to parent class (PDOWrapper) and call "Go to definition".
  5. Check the open files. PDOWrapper.php is opened from a path that appears to be outside the ${workspaceFolder}
    image

This is arguably an issue with VS Code itself, but I honestly don't know how long it would take for them to recognize it.

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

No branches or pull requests

3 participants