#566 No IntelliSense after npm install with a new project#586
Merged
mousetraps merged 1 commit intomicrosoft:masterfrom Nov 12, 2015
Merged
#566 No IntelliSense after npm install with a new project#586mousetraps merged 1 commit intomicrosoft:masterfrom
mousetraps merged 1 commit intomicrosoft:masterfrom
Conversation
This was due to a race condition with the delayed analysis queue. In particular, there were some cases where the NodejsFileNode was created (and therefore an analysis unit enqueued) after the delayed analysis queue had already finished processing existing entries. This fix simplifies the logic to make it more deterministic. In particular, get rid of the separate filewatcher altogether, add entries to the delayed analysis queue whenever new NodejsFileNodes are created, and restart the idle node_modules timer after enqueuing the unit.
Contributor
There was a problem hiding this comment.
I wouldn't create a new timer each time, but reset/start the existing timer... they are not cheap.
Contributor
Author
There was a problem hiding this comment.
It's not getting created each time - this only happens when ModulesNode is null, which is when the project hasn't been loaded yet. The timer is reset here: https://github.com/mousetraps/nodejstools/blob/i566/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs#L113
Contributor
There was a problem hiding this comment.
Cool, the things you miss when only looking at the diff...
Contributor
|
LGTM, the timer creation can be pushed to a future release. |
Member
|
If this has been validated, then 👍. Thanks! |
mousetraps
added a commit
that referenced
this pull request
Nov 12, 2015
#566 No IntelliSense after npm install with a new project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was due to a race condition with the delayed analysis queue. In
particular, there were some cases where the NodejsFileNode was created
(and therefore an analysis unit enqueued) after the delayed analysis queue
had already finished processing existing entries. This fix simplifies the
logic to make it more deterministic. In particular, get rid of the
separate filewatcher altogether, add entries to the delayed analysis queue
whenever new NodejsFileNodes are created, and restart the idle
node_modules timer after enqueuing the unit.
fix #566