-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Issues with not case/fragment-normalizing file paths (macOS, Windows) #12448
Comments
Pushed a fix for the broken file events on macOS. |
Any update on this? I keep tripping over it particularly when using the debugger. |
I spent the last month fighting gopls and I had just chalked it up to gopls being in beta, but the underlying issue was that somehow VSCode was opening |
This is the single biggest problem I have with VSCode. It makes it feel... amateurish. It is infuriating and leads to confusing issues with trying save over a file that has changed with the "other editor". VisualStudio handles it fine yeah? Try heading over the corridor and talk to them about it. |
To be fair, Visual Studio isn't (quite as) cross platform... |
|
That's why I said "quite". VSCode uses Electron and the node ecosystem which covers Windows, OSX and Linux. |
Small update from our side: this milestone a few changes got pushed that should improve the situation specifically for files that use different casing on operating systems that have case-insensitive behaviour (Windows, macOS). For example, opening a file We currently do NOT have plans to support other forms of file paths, such as:
That means, in these cases you would still see 2 editors opening with different models each, even though it is the same file on disk. But the majority of issues seems to originate from casing differences. We are closing down for our May release with the changes included and monitor regressions which may require us to rethink the approach. But if everything goes well, this change should be available in stable early June. You can already benefit from this change if you switch to our insiders build (https://code.visualstudio.com/insiders) and we welcome feedback. |
This completed for June via #93368, closing. In our current 1.46.x stable release you should already see a single editor opening if the case of the file path differs on Windows and macOS. |
Thank you! Great to see this addressed! |
@bpasero FYI: I'm in version 1.46.1 on Windows, I'm I'm seeing this issue. I created a file named |
Update: I figured out that (in Windows at least), if you wipe out the The easiest way to find And I didn't "wipe them out", instead, I just renamed them to have the extension I'm not saying I recommend this hack, but it did work for me. 🤷♂️ |
The issue that renaming files to same path but different case is not reflected in the editor should be fixed with our upcoming You can give our preview releases a try from: https://code.visualstudio.com/insiders/ |
In VS Code we deal with resource
URIs
across all layers. In most cases we useURI.toString()
to decide if a resource is equal to another resource. This assumption is not very good when we talk about file system paths because on macOS and Windows a file path should be considered equal if the paths are identical, even if the casing differs (/some/path
===/SOME/path
). Only Linux has a case-sensitive file system where this rule does not apply.This leads to numerous related issues:
The text was updated successfully, but these errors were encountered: