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

Ivy LS: duplicate results for autocomplete, quick info, etc outside of templates #1110

Closed
Memeplexx opened this issue Feb 15, 2021 · 3 comments · Fixed by #1118
Closed

Ivy LS: duplicate results for autocomplete, quick info, etc outside of templates #1110

Memeplexx opened this issue Feb 15, 2021 · 3 comments · Fixed by #1118
Labels

Comments

@Memeplexx
Copy link

Describe the bug

The latest version, v11.2.0, seems to have added 2 regression bugs:

  1. One that prevents autocompletion of class variables in templates
  2. Another which causes duplicate auto-complete options outside templates
    I'm including both bug reports here as I feel they may be related.

To Reproduce

Steps to reproduce the behavior:

  1. Upgrade to the latest version of Angular-CLI
  2. Create a new project

Bug 1:

  1. Go to app.component.html
  2. Remove all HTML
  3. attempt to get the language service to autocomplete options for class members (eg try to get it to detect title)
    image

Bug 2:

  1. Wait for up to 1 minute
  2. Anywhere in the project, for example, the app.module.ts, press ctrl+space
  3. Note that all auto-completed options have been duplicated
    image

Expected behavior

  1. I expect to get autocompletion in the template (as seen in bug 1)
  2. I expect not to see duplicate autocomplete options outside of templates (as seen in bug 2)

Logs

Please attach two logs:

  1. Console output (Go to toolbar --> View --> Output, and copy the contents)
  • Nothing showing
  1. Log file (Path is printed to the console output at startup)
  • Not sure what this means, sorry

Additional context

I'm using Windows 10
Angular CLI version 11.2.0
I tried to reproduce this in another window (in a React project) and could not do so
If I downgrade to 11.1.3 things all work as expected

@Memeplexx Memeplexx added the bug label Feb 15, 2021
@ivanwonder
Copy link
Contributor

duplicate #1109

@Memeplexx Memeplexx changed the title Duplicate autocomplete options outside of templates Lack of autocomplete inside templates and duplicate autocomplete options outside of templates Feb 16, 2021
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Feb 16, 2021
Add check to ensure the returned language service for the project is the Angular
Language Service. This removes the need for a type assertion and also prevents
the native TS LS from taking the place of ours if there is an issue with the
plugin registration (which would result in duplicate results in TS files).

Fixes angular#1110.
@atscott atscott changed the title Lack of autocomplete inside templates and duplicate autocomplete options outside of templates Ivy LS: duplicate results for autocomplete, quick info, etc outside of templates Feb 16, 2021
@atscott
Copy link
Collaborator

atscott commented Feb 16, 2021

The cause of this is indeed a duplicate of #1109, but I'm also leaving this one open because we can address the duplicate results issue by adding a safeguard when our language service plugin fails to register.

atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Feb 17, 2021
Add check to ensure the returned language service for the project is the Angular
Language Service. This removes the need for a type assertion and also prevents
the native TS LS from taking the place of ours if there is an issue with the
plugin registration (which would result in duplicate results in TS files).

Fixes angular#1110.
kyliau pushed a commit that referenced this issue Feb 17, 2021
Add check to ensure the returned language service for the project is the Angular
Language Service. This removes the need for a type assertion and also prevents
the native TS LS from taking the place of ours if there is an issue with the
plugin registration (which would result in duplicate results in TS files).

Fixes #1110.
kyliau pushed a commit that referenced this issue Mar 1, 2021
Add check to ensure the returned language service for the project is the Angular
Language Service. This removes the need for a type assertion and also prevents
the native TS LS from taking the place of ours if there is an issue with the
plugin registration (which would result in duplicate results in TS files).

Fixes #1110.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants