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

Broken intellisense for mounted filesystem #7154

Closed
tinganho opened this issue Feb 19, 2016 · 36 comments · Fixed by #7658
Closed

Broken intellisense for mounted filesystem #7154

tinganho opened this issue Feb 19, 2016 · 36 comments · Fixed by #7658
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Needs More Info The issue still hasn't been fully clarified

Comments

@tinganho
Copy link
Contributor

I've got a broken intellisense for a mounted file system for VSCode. Though it works in older versions of TypeScript. Any thoughts on what is wrong?

Please check out:
microsoft/vscode#3160

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Needs More Info The issue still hasn't been fully clarified labels Feb 19, 2016
@DanielRosenwasser
Copy link
Member

@tinganho I see that you're having issues with the nightlies/master. Are you seeing issues with the release-1.8 branch? What about release-1.7?

@tinganho
Copy link
Contributor Author

release-1.8 does not work. release-1.7.5 works.

@tinganho
Copy link
Contributor Author

@DanielRosenwasser This was the the date when it didn't work: typescript@1.8.0-dev.20160116. So everything before that works.

@tinganho
Copy link
Contributor Author

@tinganho
Copy link
Contributor Author

Is there anyway I can get the error output from VSCode? So I can get exactly what is wrong?

@DanielRosenwasser
Copy link
Member

#6509 could very well be the source, though I could be wrong. You can select Toggle Developer Tools from the Help menu, but I don't know what you'll get out of that since TSServer runs out of process.

@tinganho
Copy link
Contributor Author

I have tried that already though it doesn't give me any error.

I was also thinking about that one.

@billti
Copy link
Member

billti commented Feb 20, 2016

Can you try running tsc --watch on the command line for a project and editing some files and see if it's detected/recompiled, or if you get any other errors or unexpected behavior this way?

@tinganho
Copy link
Contributor Author

@billti I'm getting:

fs.js:1315
    throw error;
    ^

Error: watch /users/tinganho/development/mount/library ENOENT
    at exports._errnoException (util.js:860:11)
    at FSWatcher.start (fs.js:1313:19)
    at Object.fs.watch (fs.js:1341:11)
    at addDirWatcher (/usr/local/lib/node_modules/typescript/lib/tsc.js:1007:39)
    at Object.addFile (/usr/local/lib/node_modules/typescript/lib/tsc.js:1022:21)
    at Object.watchFile (/usr/local/lib/node_modules/typescript/lib/tsc.js:1140:48)
    at Object.getSourceFile (/usr/local/lib/node_modules/typescript/lib/tsc.js:33897:49)
    at findSourceFile (/usr/local/lib/node_modules/typescript/lib/tsc.js:32763:29)
    at processSourceFile (/usr/local/lib/node_modules/typescript/lib/tsc.js:32715:27)
    at /usr/local/lib/node_modules/typescript/lib/tsc.js:32801:17

@tinganho
Copy link
Contributor Author

Maybe development/mount should be Development/Mount:

screen shot 2016-02-20 at 10 28 46

I also have a Library folder and not library. If that helps.

@vladima
Copy link
Contributor

vladima commented Feb 20, 2016

I feel that our useCaseSensitiveFileNames check for node case is incomplete. Do you know if you are using HFS+ or HFSX file system?

@tinganho
Copy link
Contributor Author

I use http://osxfuse.github.io/ on my Mac. I mount with sshfs on a local VM that has Ubuntu installed on it. And the repo I mount, uses pascal case naming convention.

Don't know much about file systems.

@billti
Copy link
Member

billti commented Feb 20, 2016

Don't we decide based purely on OS whether to use case-sensitive filenames? I'm guessing if you mount a file-system different to the OS default, this logic is always going to fail:

            // win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive
            const useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin";

@vladima
Copy link
Contributor

vladima commented Feb 20, 2016

Yes, even for Darwin assumption that it is always case insensitive is incorrect - AFAIR HFS+ and HFSX will have different defaults. I was thinking if on darwin we should try to create a temp file and look it up with a different casing

@vladima
Copy link
Contributor

vladima commented Feb 20, 2016

Though it does not really help if case sensitivity changes between volumes

@mhegazy mhegazy added this to the TypeScript 2.0 milestone Feb 24, 2016
@zhengbli
Copy link
Contributor

To test the case sensitivity on mac, can we change the casing of the first file opened and call something like fileExists to see if the file still exist?

@MikaAK
Copy link

MikaAK commented Mar 9, 2016

I'm having the same issue. I have a case sensitive mac.

@kamas2k
Copy link

kamas2k commented Mar 9, 2016

I have also a case sensitive mac and this problem. It has to be fixed on site of typescript. It must be checked with fileExists or something and not on process.platform() !== "darwin", because you can have different volumes on your mac.

First i thought the problem is on Node.js, because the process.platform() don't differentiate on darwin case sensitive or case insensitive. But actually platform is right. It has nothing todo with the actual filesystem.

In Typescript Version 1.7.5 there is no Problem with CaseSensitivity because the filename and not the path is taken and in one case the variable useCaseSensitiveFileNames doesn't matter at all.

// win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive
const useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin";

@basarat
Copy link
Contributor

basarat commented Mar 17, 2016

I just treat all TypeScript project files as case sensitive (i.e take care in tsconfig.json and any import / references). After all they are case sensitive on Git / git checkout so helps to make sure you can checkout on any and all file systems / operating systems. I have the same assumption in the devtools I write for TypeScript 🌹

@zhengbli
Copy link
Contributor

@tinganho can you give #7658 a try? As I don't have the mounted environment. Thank you!

@tinganho
Copy link
Contributor Author

@zhengbli I pulled it down. It seems to work now. At least for my case.

@zhengbli
Copy link
Contributor

@tinganho Thanks!

@zhengbli zhengbli added the Fixed A PR has been merged for this issue label Mar 24, 2016
@ivan-zakharchuk
Copy link

Actually I have pretty the same issue on OSX(10.11.4 (15E65))

tsc -w
fs.js:1315
    throw error;
    ^

Error: watch /users/ivan-zakharchuk/documents/my-proj ENOENT
    at exports._errnoException (util.js:890:11)
    at FSWatcher.start (fs.js:1313:19)
    at Object.fs.watch (fs.js:1341:11)
    at addDirWatcher (/Users/ivan-zakharchuk/.npm-packages/lib/node_modules/typescript/lib/tsc.js:1036:39)
    at Object.addFile (/Users/ivan-zakharchuk/.npm-packages/lib/node_modules/typescript/lib/tsc.js:1051:21)
    at Object.watchFile (/Users/ivan-zakharchuk/.npm-packages/lib/node_modules/typescript/lib/tsc.js:1172:48)
    at Object.executeCommandLine (/Users/ivan-zakharchuk/.npm-packages/lib/node_modules/typescript/lib/tsc.js:34532:44)
    at Object.<anonymous> (/Users/ivan-zakharchuk/.npm-packages/lib/node_modules/typescript/lib/tsc.js:34863:4)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)

tsc -v
Version 1.8.9

@ivan-zakharchuk
Copy link

Hope @tinganho will be able to look at this issue and reopen it.

@ivan-zakharchuk
Copy link

Downgrade to 1.7.5 - fixes this problem.

@tinganho
Copy link
Contributor Author

tinganho commented Apr 5, 2016

@ivanzvakoms I don't think the working version is released yet. You probably have to use typescript@next.

As you can see the milestone is marked for 2.0.

@ivan-zakharchuk
Copy link

@tinganho yeah, I see. I just noticed this bug which is connected to ver >1.7.5 and If I understand correctly, because of some regression this issues is happening on newest versions now(in typescript@next as well).

@tinganho
Copy link
Contributor Author

tinganho commented Apr 5, 2016

I haven't experienced any regression. So have you ran?

npm install typescript@next -g

and then:

tsc -w

today?

@ivan-zakharchuk
Copy link

yes, I've run this today(typescript@1.9.0-dev.20160405 ), and error is the same as described above.

@tinganho
Copy link
Contributor Author

tinganho commented Apr 5, 2016

OK tsc -w doesn't work for me either.

But the intellisense from VSCode does.

@kazuhiko-hotta
Copy link

I've got an error like bellow.

I use Mac on casesensitve root filesystem.
so I made a incasesinsive volume and mounted it. but it didn't work.

$ node -v
v5.11.1

$ tsc -v
Version 1.8.10

$ npm test

> angular2-quickstart@1.0.0 test /Volumes/quickstart/quickstart
> tsc && concurrently "tsc -w" "karma start karma.conf.js"

[0] fs.js:1425
[0]     throw error;
[0]     ^
[0]
[0] Error: watch /volumes/quickstart/quickstart ENOENT
[0]     at exports._errnoException (util.js:953:11)
[0]     at FSWatcher.start (fs.js:1423:19)
[0]     at Object.fs.watch (fs.js:1450:11)
[0]     at addDirWatcher (/Volumes/quickstart/quickstart/node_modules/typescript/lib/tsc.js:1036:3```

the error says that couldn't find "/volumes/quickstart/quickstart".

actuall path was...

```bash
$ pwd
/Volumes/quickstart/quickstart

so I've make a symbolic link for it.

sudo ln -s /Volumes /volumes

it works well just for now.

$ npm test

> angular2-quickstart@1.0.0 test /Volumes/quickstart/quickstart
> tsc && concurrently "tsc -w" "karma start karma.conf.js"

it seems work well.

@zhengbli
Copy link
Contributor

@kazuhiko-hotta can you test using the nightly? The fix was merged in master, it wasn't ported to 1.8 yet.

@pedropolisenso
Copy link

pedropolisenso commented May 30, 2016

Hey guys,

I'm with a problem about ENOENT in my project using Version 1.8.10.

How I can resolve? someone can help me, please?

this is problem:

Error: watch /users/pedropolisenso/applications/b2w/simple-basket-api ENOENT
    at exports._errnoException (util.js:953:11)
    at FSWatcher.start (fs.js:1423:19)
    at Object.fs.watch (fs.js:1450:11)
    at addDirWatcher (/Users/pedropolisenso/Applications/b2w/simple-basket-api/node_modules/typescript/lib/tsc.js:1036:39)
    at Object.addFile (/Users/pedropolisenso/Applications/b2w/simple-basket-api/node_modules/typescript/lib/tsc.js:1051:21)
    at Object.watchFile (/Users/pedropolisenso/Applications/b2w/simple-basket-api/node_modules/typescript/lib/tsc.js:1172:48)
    at Object.executeCommandLine (/Users/pedropolisenso/Applications/b2w/simple-basket-api/node_modules/typescript/lib/tsc.js:34546:44)
    at Object.<anonymous> (/Users/pedropolisenso/Applications/b2w/simple-basket-api/node_modules/typescript/lib/tsc.js:34877:4)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)

I run this command using npm run build-watch - "build-watch": "tsc -w --pretty",

@zhengbli
Copy link
Contributor

@pedropolisenso is it possible for you to test using the nightly version of the compiler? The fix was merged in master but not ported in 1.8. You can using:

  "dependencies": {
    "typescript": "^1.9.0-dev.20160531-1.0"
  }

in your package.json.

@kazuhiko-hotta
Copy link

I tested with TypeScript nigtly build.

    "typescript": "^1.9.0-dev.20160603-1.0",

removed the trick that I did before.

sudo rm -f /volumes
ls -l / | grep -i volumes

drwxrwxrwt@  4 root  admin   170  6  3 19:40 Volumes

checked "npm test" again.

% npm test

> angular2-quickstart@1.0.0 test /Volumes/quickstart/quickstart
> tsc && concurrently "tsc -w" "karma start karma.conf.js"

[1] 03 06 2016 20:39:12.405:WARN [watcher]: Pattern "/Volumes/quickstart/quickstart/app/**/*.html" does not match any file.
[1] 03 06 2016 20:39:12.412:WARN [watcher]: Pattern "/Volumes/quickstart/quickstart/app/**/*.css" does not match any file.
[1] 03 06 2016 20:39:13.245:WARN [karma]: No captured browser, open http://localhost:9876/
[1] 03 06 2016 20:39:13.265:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
[1] 03 06 2016 20:39:13.277:INFO [launcher]: Starting browser Chrome
[0] 20:39:14 - Compilation complete. Watching for file changes.
[1] 03 06 2016 20:39:14.914:INFO [watcher]: Changed file "/Volumes/quickstart/quickstart/app/app.component.js".
[1] 03 06 2016 20:39:14.947:INFO [watcher]: Changed file "/Volumes/quickstart/quickstart/app/main.js".
[1] 03 06 2016 20:39:14.962:INFO [watcher]: Changed file "/Volumes/quickstart/quickstart/app/app.component.spec.js".
[1] 03 06 2016 20:39:15.178:WARN [karma]: No captured browser, open http://localhost:9876/
[1] 03 06 2016 20:39:15.429:INFO [Chrome 51.0.2704 (Mac OS X 10.11.5)]: Connected on socket /#sxj38cAB15UjpQmWAAAA with id 41710968
    Chrome 51.0.2704 (Mac OS X 10.11.5): Executed 3 of 3 SUCCESS (0.184 secs / 0.166 secs)

it works.
Thanks @zhengbli :-)

@rbosneag
Copy link

rbosneag commented Sep 28, 2016

IntelliSense still not working for me on Sublime 3 with a project on a mounted filesystem under OSX El Capitan with Sublime 3 (build 3126) with tsc -v Version 2.0.3.

I copied the project folder to the local drive and everything is fine. While opening from the remote filesystem (which is a Raspberry Pi folder mapped through Netatalk as a local volume) IntelliSense is not working at all. No errors in the Sublime console but autocompletion is not working, for example.

I tried @kazuhiko-hotta 's solution with the symlink, I changed the paths to be fully lower case, set node_path in user settings, tried other solutions but to no avail.

I use nvm on both systems and Node is high enough on both ends (v5.x on the Mac, v6.x on the RasPi). TypeScript is up to date, so are all my Sublime packages.

Any clue on how could I debug this and see what's wrong?

LE: I realised I still had a capital letter in the project path and converting it to _lowercase fixed the problem_. Strange thing is that /Volumes/blah... contains a capital V and it still works while having any other capital letter in the path breaks IntelliSense.

However, I was hoping that after the 1.9.x release this case-sensitivity issue should not be a problem anymore.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Needs More Info The issue still hasn't been fully clarified
Projects
None yet
Development

Successfully merging a pull request may close this issue.