Autoimport fails when Autocomplete is invoked quickly #106361
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
Steps to Reproduce:
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
The text was updated successfully, but these errors were encountered: