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

intellisense disappears after closing VS when there is an incomplete statement in editor #63

Closed
mousetraps opened this issue Apr 12, 2015 · 5 comments

Comments

@mousetraps
Copy link
Contributor

  1. create new console project
  2. npm install async
  3. type code in editor
var async = require('async')
async.all
  1. F12 on 'all', and go to definition. (takes you to right place in async.js)
  2. save, close, and reopen project
  3. F12 on 'all' - doesn't work... instead pops up this dialog:
---------------------------
Node.js Tools for Visual Studio
---------------------------
Cannot go to definition "async.all"
---------------------------
OK   
---------------------------
And intellisense is completely borked until you delete the .dat file and reload the project. 

This issue doesn't seem to occur if the statement is complete

We fixed it earlier, but looks like it's back :( https://nodejstools.codeplex.com/workitem/1706
more discussion: https://nodejstools.codeplex.com/workitem/1963

@jinglouMSFT
Copy link
Contributor

Incomplete code only breaks built-in node module intellisense. User loaded modules still have the intellisense. So codeplex #1963 is indeed not fixed. The current bug was partially fixed.

@zhengbli
Copy link

I cannot reproduce this bug using the latest build. Both the intellisense and navigation to definition works fine when I reopen the project.

Env:
VS 2015 RTM
NTVS build 20150831

@mousetraps
Copy link
Contributor Author

Did you try reproducing this issue?
https://nodejstools.codeplex.com/workitem/1963

It turns out they were actually separate.

@zhengbli
Copy link

@mousetraps I can repro that one. Looking into it.

@zhengbli
Copy link

zhengbli commented Sep 1, 2015

@mousetraps I found out that the problem might be the Scope.EnumerateTowardsGlobal line at https://github.com/Microsoft/nodejstools/blob/master/Nodejs/Product/Analysis/Analysis/Analyzer/ExpressionEvaluator.cs#L68
returns correct type the first time; but returns empty object type after reopening the project. Though the function is a abstract function, and I don't know anything about the analysis engine, so can you share some thoughts on this?

@mousetraps mousetraps self-assigned this Sep 10, 2015
mousetraps added a commit to mousetraps/nodejstools that referenced this issue Sep 10, 2015
incomplete statement in the editor
- Fixes an issue where we were we were inadvertently unloading
  built-in modules from analysis in some scenarios.
mousetraps added a commit that referenced this issue Sep 10, 2015
Fix #63 IntelliSense disappears after closing VS when there is an
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants