microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.96k stars 29.53k forks source link

IntelliSense for module paths does not find modules in current path if current folder contains capital letters in its name. #133828

Closed KerimG closed 1 year ago

KerimG commented 3 years ago

Issue Type: Bug

Create an empty project folder with following structure:

|-- fooAAA
|   `-- foo.js
|   `-- bar.js

when trying to require foo.js with

const foo = require("./foo");

the path in the require function does not trigger IntelliSense when the path starts with "." (the dot, as in current folder)

When changing the "fooAAA" to "fooaaa" it works fine. The project sits on a case-sensitive mac (HFS+) drive. Just in case, that's what's causing the issue.

VS Code version: Code 1.60.2 (7f6ab5485bbc008386c4386d08766667e155244e, 2021-09-22T11:59:08.826Z) OS version: Darwin arm64 20.6.0 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Apple M1 (8 x 24)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|1, 1, 1| |Memory (System)|8.00GB (0.11GB free)| |Process Argv|--crash-reporter-id 67d65d84-87b5-4f20-93a5-352da0d3a7ea| |Screen Reader|no| |VM|0%|
Extensions (26) Extension|Author (truncated)|Version ---|---|--- TabOut|alb|0.2.1 spellright|ban|3.0.60 ibmi-languages|bar|0.5.9 markdown-preview-github-styles|bie|0.2.0 better-toml|bun|0.3.2 npm-intellisense|chr|1.4.0 bracket-pair-colorizer-2|Coe|0.2.1 vscode-eslint|dba|2.1.25 githistory|don|0.6.18 gitlens|eam|11.6.0 vscode-npm-script|eg2|0.3.22 prettier-vscode|esb|9.0.0 vscode-firefox-debug|fir|2.9.4 mayukaithemevsc|Gul|3.0.1 vscode-sshfs|Kel|1.22.0 rainbow-csv|mec|1.9.1 git-graph|mhu|1.30.0 debugger-for-chrome|msj|4.13.0 vetur|oct|0.34.1 LiveServer|rit|5.6.1 bash-debug|rog|0.3.9 rust|rus|0.7.8 svelte-vscode|sve|105.4.0 vscode-status-bar-format-toggle|tom|2.0.0 pdf|tom|1.1.0 vscode-icons|vsc|11.6.0 (5 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyt639:30300192 pythontb:30283811 pythonvspyt551cf:30345471 pythonptprofiler:30281270 vsdfh931cf:30280410 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 pythonvsuse255:30340121 vscod805:30301674 pythonvspyt200:30340761 binariesv615:30325510 vsccppwt:30364497 pythonvssor306:30344512 bridge0708:30335490 pygetstartedt2:30371810 dockerwalkthrucf:30370837 bridge0723:30353136 pythonrunftest32:30365366 pythonf5test824cf:30361778 javagetstartedc:30364665 pythonvspyt187:30365361 pydsgst2:30361792 vssid140:30363603 vssur157:30367808 ```
mjbvz commented 3 years ago

I'm not able to reproduce this in my testing: Screen Shot 2021-09-27 at 2 51 42 PM

Does this reproduce in the latest VS Code insiders build with all extensions disabled?

KerimG commented 3 years ago

@mjbvz

Yes. I was able to reproduce this on the latest VS Code Insiders build with extensions turned off:

Screenshot 2021-09-28 at 08 56 08

I also commented out all of my user settings, just to make sure it's not some weird setting causing the issue.

mjbvz commented 3 years ago

Ah actually I can hit this now if I'm on a case-insensitive main drive but then open a folder on a case-sensitive drive (APFS vs HFS doesn't seem to matter)

Here's the code that likely causes the issue if someone wants to investigate:

https://github.com/microsoft/vscode/blob/c6d45158c50c7a65ab0cca1f2d8478c25f2f2d48/extensions/typescript-language-features/src/utils/fileSystem.electron.ts#L18

hannahcoles commented 2 years ago

@mjbvz Hi! Has this issue been resolved yet? I am trying to contribute to a GitHub project for the first time and this seems like a good first issue. Let me know, thanks!

KerimG commented 2 years ago

@hannahcoles the issue is still open. I am currently running this version of VS Code:

Version: 1.67.2
Commit: c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
Date: 2022-05-17T18:20:04.972Z
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Darwin arm64 21.5.0

and can still reproduce the problem.

vscodenpa commented 1 year ago

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!