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

Autocomplete shows multiple of the same item #37930

Closed
jtsom opened this issue Nov 9, 2017 · 10 comments
Closed

Autocomplete shows multiple of the same item #37930

jtsom opened this issue Nov 9, 2017 · 10 comments
Assignees
Labels
extensions Issues concerning extensions upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@jtsom
Copy link

jtsom commented Nov 9, 2017

  • VSCode Version: Code - Insiders 1.18.0-insider (dcee220, 2017-11-08T08:15:14.690Z)
  • OS Version: Darwin x64 17.2.0
  • Extensions: Extensions are disabled

Steps to Reproduce:

  1. Start typing code. Autocomplete popup shows up.
  2. Popup shows multiple items of the same thing - up to 8 to 10

image

Reproduces without extensions: Yes

@vscodebot vscodebot bot added extensions Issues concerning extensions insiders labels Nov 9, 2017
@jtsom
Copy link
Author

jtsom commented Nov 9, 2017

A little more info... this seems to happen when VC Code is set to use it's own version of Typescript (2.6.1). When I switch to the version in the project (2.4.2), I see the correct popup items.

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Nov 10, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Nov 10, 2017

@jtsom If you scroll through these suggestions, do they all have identical descriptions?

TS 2.6 brought support for automatic imports. If there are multiple MatSnackBarConfig defined in your project, we will show an entry for each unique one. Selecting one should add the import from the corresponding file

@jtsom
Copy link
Author

jtsom commented Nov 10, 2017

Yes, each one has the same description. It definitely looks like it's just duplicating the entries. Again when I switched to using the project's Typescript, the popup was much shorter.

@mjbvz
Copy link
Collaborator

mjbvz commented Nov 10, 2017

Can you please collect the typescript server trace of this to help us investigate. To do this:

  1. Set "typescript.tsserver.trace": "verbose" in vscode

  2. Trigger the incorrect suggestion again

  3. Open the output view and go to the TypeScript section

    screen shot 2017-11-10 at 11 17 24 am
  4. Share the output from there

Thanks

@jtsom
Copy link
Author

jtsom commented Nov 10, 2017

Sure. Here you go. With a screenshot of what I did that generated the output:

image

typescripttrace.txt

@jtsom
Copy link
Author

jtsom commented Nov 10, 2017

FWIW, here's a screenshot with Typescript set to the project's (2.4.2):

image

@mjbvz mjbvz added upstream Issue identified as 'upstream' component related (exists outside of VS Code) and removed info-needed Issue requires more information from poster labels Nov 10, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Nov 10, 2017

Thanks for the additional info! I confirmed the bug and have opened microsoft/TypeScript#19922 to track this against TypeScript

Closing as upstream

@mjbvz mjbvz closed this as completed Nov 10, 2017
@jtsom
Copy link
Author

jtsom commented Nov 21, 2017

Any idea when this is going to be filtered back to VS Code? I see the latest insiders has an insiders version of Typescript, but doesn't seem to fix the problem.

@mjbvz
Copy link
Collaborator

mjbvz commented Nov 27, 2017

This should be fixed in TypeScript@next (Typescript 2.7). You can use this version in current versions of VS Code by following these instructions: https://code.visualstudio.com/Docs/languages/typescript#_using-newer-typescript-versions

@jtsom
Copy link
Author

jtsom commented Dec 12, 2017

Sorry to say, this problem still exists with Typescript 2.7.

Here's screenshot from 2.6.2:

ts262

And here's one from the latest 2.7dev version - it's actually worse!

ts270dev

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions Issues concerning extensions upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants