Skip to content

auto type acquisition doesn't kick in without --save #15844

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

Closed
mousetraps opened this issue Nov 22, 2016 · 4 comments
Closed

auto type acquisition doesn't kick in without --save #15844

mousetraps opened this issue Nov 22, 2016 · 4 comments
Assignees
Labels
javascript JavaScript support issues typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@mousetraps
Copy link
Contributor

  • VSCode Version: Code 1.7.2 (7ba55c5, 2016-11-21T22:06:37.428Z)
  • OS Version: Windows_NT ia32 10.0.14931

Steps to Reproduce:

  1. remove underscore from %localappdata%/TypeScript/package.json and from corresponding node_modules
  2. open a Node project that does not have underscore installed (e.g. https://github.com/Microsoft/vscode-smoketest-express.git). VSCode will subsequently install type-registry, and any @types associated with the project.
  3. npm install underscore

Expected: underscore is installed, as are associated types, even though it doesn't exist in package.json
Actual: types are not installed

Note that reloading the project altogether yields the expected behavior.

@dbaeumer dbaeumer assigned waderyan and unassigned dbaeumer Nov 22, 2016
@dbaeumer
Copy link
Member

@waderyan looks like a TS issue to me.

@mjbvz mjbvz added javascript JavaScript support issues typescript Typescript support issues labels Nov 22, 2016
@mjbvz
Copy link
Collaborator

mjbvz commented Nov 22, 2016

This discussion on the TS side tracks a somewhat related design consideration: microsoft/TypeScript#11917

I believe this is currently the expected behavior, but I'll go ahead and open a issue against TS to see if this is the correct design. In the simple npm install X case, it probably makes sense to download the typings, but would would also want to make sure we don't install unnecessary typings for second level+ dependencies.

@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Nov 22, 2016
@mjbvz
Copy link
Collaborator

mjbvz commented Nov 22, 2016

After more investigation, I found that we do acquire typings in this case, but only after we trigger a project update in some way (for example, editing a file):

nov-22-2016 15-30-43

In the --save case, we always install the typings. In the regular install case, it seems the typings are only installed after I edit and save a file or reload the project. It could be that the --save case is automatically sending some edit action to the server which triggers the typing acquisition, or TS could be handling this differently.

@waderyan
Copy link

Closing in this end as this issue is tracked in TS's repo.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants