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

Better support for case sensitive macOS #94307

Open
FernandoMiguel opened this issue Apr 2, 2020 · 39 comments
Open

Better support for case sensitive macOS #94307

FernandoMiguel opened this issue Apr 2, 2020 · 39 comments
Assignees
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues file-io File I/O macos Issues with VS Code on MAC/OS X
Milestone

Comments

@FernandoMiguel
Copy link

Issue Type: Bug

I have found a case where a GIT repo has two folders with different casing.
but VSCode only shows one directory

related to #90983

VS Code version: Code - Insiders 1.44.0-insider (20b88fa, 2020-04-01T08:34:11.087Z)
OS version: Darwin x64 19.4.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 3, 3, 3
Memory (System) 16.00GB (0.80GB free)
Process Argv -psn_0_5612890
Screen Reader no
VM 0%
Extensions (22)
Extension Author (truncated) Version
vscode-base64 ada 0.1.0
markdown-toc Ala 1.5.6
inline-hasher ale 1.0.0
spellright ban 3.0.50
better-toml bun 0.3.2
gotemplate cas 0.3.0
hadolint exi 0.3.0
github-actions for 0.0.1
terraform mau 1.4.0
markdown-shortcuts mdi 0.12.0
vscode-docker ms- 1.0.0
github-actions-vscode Oma 2.7.0
vscode-yaml-sort Pas 2.3.0
errorlens Phi 1.1.3
vscode-yaml red 0.7.2
vscode-gitweblinks red 1.5.0
code-settings-sync Sha 3.4.3
vscode-nginx sha 0.6.0
shellcheck tim 0.9.0
sort-lines Tyr 1.9.0
vscode-icons vsc 10.0.0
HCL who 0.0.5
@vscodebot
Copy link

vscodebot bot commented Apr 2, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@joaomoreno
Copy link
Member

That's great. Please provide reproducible steps so I can reproduce it locally. Provide as much information as you can.

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Apr 3, 2020
@FernandoMiguel
Copy link
Author

git clone --single-branch https://github.com/FernandoMiguel/microsoft-vscode-94307.git
code microsoft-vscode-94307

you should only see one folder while the dir has two

@FernandoMiguel
Copy link
Author

image
image

@joaomoreno joaomoreno assigned isidorn and unassigned joaomoreno Apr 6, 2020
@joaomoreno joaomoreno changed the title case sensitive git Code shows one folder where there are two with the same name and different casing Apr 6, 2020
@isidorn
Copy link
Contributor

isidorn commented Apr 6, 2020

Works for me with Linux 18, latest vscode insiders
Screenshot 2020-04-06 at 11 38 10

@isidorn isidorn added the file-explorer Explorer widget issues label Apr 6, 2020
@FernandoMiguel
Copy link
Author

doesn't on macOS

@isidorn
Copy link
Contributor

isidorn commented Apr 6, 2020

macOS is case insensitive. File System Provider would have to specify that it is case sensitive which it does not atm. fyi @bpasero

@FernandoMiguel
Copy link
Author

@isidorn my file system is set to be case sensitive
image

@bpasero
Copy link
Member

bpasero commented Apr 6, 2020

@isidorn this is more than just declaring on the level of the file system provider. Every usage of node fs would need to be aware of case sensitive FS on macOS. I doubt we have adopted the FS provider consistently yet.

@bpasero
Copy link
Member

bpasero commented Apr 6, 2020

Nevertheless, yeah, where we use the FS provider it would probably benefit (as in this case).

I am not 100% sure how to detect this though, other than creating 2 files with the same case.

@isidorn
Copy link
Contributor

isidorn commented Apr 6, 2020

@bpasero agree case sensitive macOS we do not fully support. In order to support that we would have to make many more changes, not only the FS provider. Due to that leaving this open as a feature request for now. Since changes would have to be done across the workbench.

@isidorn isidorn changed the title Code shows one folder where there are two with the same name and different casing Better support for case sensitive macOS Apr 6, 2020
@isidorn isidorn added macos Issues with VS Code on MAC/OS X feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels Apr 6, 2020
@isidorn isidorn added this to the Backlog milestone Apr 6, 2020
@caduellery
Copy link

It's really annoying behavior. Would love have it fixed.

@ExE-Boss
Copy link
Contributor

ExE-Boss commented Oct 6, 2020

This also occurs on Windows with the directory CaseSensitiveInfo flag enabled: #104376

@kammoh
Copy link

kammoh commented May 7, 2022

2 years after the issue was opened, any workarounds or any fixes on the radar?

@lramos15 lramos15 assigned lramos15 and unassigned JacksonKearl May 25, 2022
@airtonix
Copy link

this is a thing: https://worthdoingbadly.com/casesensitive-iossim/

basically i think we need a plist file that describes that vscode should have a case sensistive view onto the filesystem:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.private.iopol.case_sensitivity</key>
<true/>
</dict>
</plist>

@Jerry-Ma
Copy link

Jerry-Ma commented Oct 7, 2022

Hi,
I am using macOS with case-sensitive volume and recently found that the parsed compileCommands.json file content are all stored lower case internally, which causes the include paths etc. can not be correctly recognized and loaded. Do we have any work around on this issue?

@EnriqueDev
Copy link

In case this is keeping you stuck of forcing you into weird names.

  1. Close the file if open
  2. duplicate the file
  3. remove the original
  4. Reload ts server (if using typescript)
  5. Reload window

Bit of a workaround but it helped me to keep working.

@Icehunter
Copy link

I have an even weirder issue that's part of this. If I create a file. Change casing. Deleting file. Recreate with proper casing, VSCode will say the file doesn't exist, it will show in list, I can open it in a new window just fine, but in folder view it will always fail.

If I close VSCode delete file and recreate, upon opening VSCode it still says file not found, create (which fails as overwrite flag is not set) and I can only use the file again after I rename it to the original working filename.

@oriolarcas
Copy link

Same issue as @Icehunter: created "README.md", renamed it to "Readme.md", now if I go back to "README.md" Visual Studio Code will complain that the file doesn't exist, and it I try to create it if fails because "overwrite flag is not set".

Could fix it with the workaround from @gatsbyz: rename it through the shell to "foo.md", then with vscode rename it to "README.md".

@Leland
Copy link

Leland commented Feb 27, 2023

Interestingly, search directories (Cmd-F) appears to be case sensitive on my case insensitive macOS.

Files to include: src/components/form, 0 results

Files to include: src/components/Form, 108 results

This happens irrespective of the search's Match Case setting.

@SampsonCrowley
Copy link

Also causes issues with .gitignore displays. if it adds any random motivation, I never had this problem with atom

screenshots show a folder that is NOT gitignored. only looks like it in vscode explorer

Screenshot 2023-03-12 at 7 46 53 PM
Screenshot 2023-03-12 at 7 47 07 PM

@Vl4dimyr
Copy link

Vl4dimyr commented Mar 22, 2023

Hey @lramos15, since you closed #177925, could you please add a windows label on this issue? And do you consider this to be a missing feature or a bug(?), since case sensitivity in vscode is not an issue on Linux this looks like a bug to me.

@luke-lacroix-healthy
Copy link

We use Debian as the OS for our Docker images and we use Ubuntu as the OS for build and CI. In both those cases, the file-system is case-sensitive. In order to prevent issues where imports resolve on MacOS but not anywhere else, I use a case-sensitive volume for my development work.

So, this is a big issue for me and my team.

I understand it may be difficult to fix the file-system provider to allow it to detect this situation on MacOS. However, it seems like, as a simple work-around, we should be able to change a workspace setting so that I can manually set VSCode to case-sensitive mode on MacOS.

@paro-paro
Copy link

Is there any progress or any plans on supporting/fixing this?

@humanchimp
Copy link

After renaming a file on macOS to change only the case, the old casing persists even after quitting VSCode and reopening it. It's cached someplace.

@luke-lacroix-healthy
Copy link

After renaming a file on macOS to change only the case, the old casing persists even after quitting VSCode and reopening it. It's cached someplace.

My work-around, right now, is to close VSCode (right-lick on the launch icon and choose "Quit"), use the CLI to rename the file, and then launch VSCode.

@humanchimp
Copy link

humanchimp commented Jun 13, 2024

YMMV, but that didn't work for me. I still have the file incorrectly named in my tabs (but not my tree). I will close the tab and get it to be right for a while, and then I'll look up there and it will have regressed to the incorrect casing again. I have tried renaming the file to something else entirely, and renaming it back, I have tried quitting VScode, closing the tabs, I have even restarted the Mac. VScode is internally confused about the name of the file. See attached screenshot (my irrelevant code is censored in the screenshot, and it is annotated to illustrate the bug, but otherwise it hasn't been manipulated). My git history is dirty because I am in the middle of something, but rest assured, the file was only ever committed with "resource" spelled lowercase. It was named with a capital R for only a short time before being renamed to lowercase.

Screenshot 2024-06-13 at 7 49 26 AM

Update: I just looked up there after doing nothing in the minutes since posting the screenshot above, and it has now spontaneously flopped to the correct spelling in the tabs. This is some caching issue. Hopefully I won't be afflicted with this again for awhile.

Update: nope, it is back to being spelled Resource with a capital R again. Just another sign of the times, a maddening, Gilliamesque bug that our overlords refuse to fix

@icazemier
Copy link

icazemier commented Sep 25, 2024

It is VERY important VSCode starts supporting this, knowing many live environments (using case sensitive file systems) have a runtime where files are dynamically loaded.

It is just silly, create a file, upper cased, rename the file in VSCode to lower cased, and the upper cased file does not show anymore...

Just to know, IntelliJ already does this for many years, with good reason.

It also PREVENTS bugs in live environments where one detects these bugs in development time.

Yes MacOS/Windows has a case insensitive file system, but power users create a separate partition/volume to tackle this, and be as close to the real live environment this way.

Please don't ignore this maybe seemingly low prio issue.

@oriolarcas
Copy link

Yes MacOS/Windows has a case insensitive file system, but power users create a separate partition/volume to tackle this, and be as close to the real live environment this way.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues file-io File I/O macos Issues with VS Code on MAC/OS X
Projects
None yet
Development

No branches or pull requests