-
Notifications
You must be signed in to change notification settings - Fork 123
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
Duplicate definitions shown in 'Go to Definition' for Angular templates #2133
Comments
Is there anyone on the other end who cares about these issues or will they remain untouched forever? This is a pain, having duplicate references makes the extension unusable. The problem is that the TS service and this extension are showing references at the same time, when one of the two should have preference over the other. Can anyone offer support, please? |
I haven't been able to reproduce the issue in any of the listed versions. Note that VSCode deduplicates results itself. Do you have other extensions that are somehow providing results for the definition outside of the Angular Language Service? If another extension is providing a reference that has a different span than what Angular provides, it would not be considered a duplicate. |
@atscott No, is due to the Angular Language Service extension 100%. I have been able to verify that it only happens when definitions are requested from the template. Maybe this detail will help to reproduce it 🙂 |
Unfortunately not and I suspect this is a problem unique to your development environment since there have been no additional reports of this issue. Are you able to provide a reproduction github repo? Can you also enable verbose server tracing and include the information from the definition request in the output panel showing the duplicate results? |
Yes, sure. Let me test it with a VSCode from scratch, and I'll get back to you with the results and the repo if the bug is still present. Thanks! |
@atscott you were absolutely right, sorry... it is not a bug in the Angular Service extension, the problem is caused by another extension (angular2-switcher). It seems that the tests I did when opening the issue were not enough, but I hope this helps someone who has the same thing happen to them in the future. Thank you! |
No worries, glad you were able to get to the bottom of this! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 bug report
Is this a regression?
No.
Description
Angular templates incorrectly show duplicate definitions for methods or variables in the editor. When clicking on a method or variable, a modal appears to select the definition, but as shown in the attached screenshot, the same definition is listed multiple times.
Reproduction
Steps to reproduce the behavior:
Expected behavior
Each method or variable should appear only once in the modal for selection.
Screenshots
🌍 Your Environment
Angular Version: 14, 16 and 18
Extension Version:
VSCode Version:
Operating System:
Anything else relevant?
The text was updated successfully, but these errors were encountered: