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

Autoimport fails when Autocomplete is invoked quickly #106361

Closed
lukewlms opened this issue Sep 9, 2020 · 3 comments
Closed

Autoimport fails when Autocomplete is invoked quickly #106361

lukewlms opened this issue Sep 9, 2020 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) javascript JavaScript support issues suggest IntelliSense, Auto Complete typescript Typescript support issues
Milestone

Comments

@lukewlms
Copy link

lukewlms commented Sep 9, 2020

  • VSCode Version: 1.49.0-insider
  • OS Version: MacOS Catalina 10.15.6

Steps to Reproduce:

  1. Start typing an import name that has not yet been imported, to bring up the Autocomplete menu
  2. Quickly hit Tab to autocomplete

Result: Autocomplete happens but variable is not found because auto-import failed

(Auto-import only succeeds if I wait an extra 0.5+ seconds until the Auto-Import suggestion loads.)

Expected: If Auto-Import is turned on then Autocomplete of a variable not in the current file already should always auto-import; probably a Tab press should just bring up the Autocomplete suggestions or should not process until after that, because an autocompleted but not imported item that's going to be invalid seems likely to almost never be what the user wants.

Notes: This took me a long time to diagnose because Auto-import usually just failed and I couldn't figure out why. It seems to me an unexpected and erroneous state if VS Code believes it can find an import, then autocompletes it, then afterward it's not found and invalid.

This also slows down the user every time trying to Autocomplete because it will often be unknown if the import has been imported yet or not; if so then fast autocomplete is possible, if not then the user must wait for the Auto-Import box to show up or if autocomplete Tab press was submitted quickly, go back and autocomplete again, this time waiting for the auto-import box.

Fixing this would probably save millions of times 1 second as autocompletes unexpectedly don't auto-import. Just finally understanding this issue is saving me a lot of frustration.

Thanks for taking a look and for the great app.

Does this issue occur when all extensions are disabled?: Yes

@vscodebot
Copy link

vscodebot bot commented Sep 9, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@lukewlms lukewlms changed the title Autoimport fails when Autocomplete is invoked rapidly Autoimport fails when Autocomplete is invoked quickly Sep 9, 2020
@lukewlms
Copy link
Author

lukewlms commented Sep 9, 2020

@vscodebot not a duplicate.

@mjbvz mjbvz added this to the Backlog milestone Sep 28, 2020
@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug typescript Typescript support issues javascript JavaScript support issues suggest IntelliSense, Auto Complete labels Sep 28, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Oct 14, 2020

Duplicate of #73311 I believe

@mjbvz mjbvz closed this as completed Oct 14, 2020
@mjbvz mjbvz added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 14, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) javascript JavaScript support issues suggest IntelliSense, Auto Complete typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

2 participants