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-native issue - duplicated "Find all references" results #1124

Closed
kunajs opened this issue Feb 17, 2021 · 7 comments
Closed

ivy-native issue - duplicated "Find all references" results #1124

kunajs opened this issue Feb 17, 2021 · 7 comments
Assignees
Labels

Comments

@kunajs
Copy link

kunajs commented Feb 17, 2021

Describe the bug
After enabling the ivy-native feature, "Find all references" returns duplicated occurences of references (even with v11.2.1).

image

image

With unchecked "Experimental-Ivy" feature it works fine.

Seems to be somehow related to this issue: #1109

@ivanwonder
Copy link
Contributor

I think it's not related to that issue. my guess is that one result comes from vscode ts server, another comes from Angular LS.

@atscott
Copy link
Collaborator

atscott commented Feb 19, 2021

@kunajs - What version of the extension are you using? v11.2.1 is known to have problems.

@atscott
Copy link
Collaborator

atscott commented Feb 19, 2021

@kunajs My mistake, I didn't realize there was another release. Do you have a project that you can share so we can reproduce the issue? I have not been able to reproduce this locally.

@atscott
Copy link
Collaborator

atscott commented Feb 19, 2021

@kunajs - I am able to reproduce this locally now. It appears VSCode may have a different internal implementation of "find all references" and "go to references". It was assumed that VSCode de-duplicated these results in both places but they may only be doing that for their gotoSymbol:

https://github.com/microsoft/vscode/blob/ea4d99921cc790d49194e897021faee02a1847f7/src/vs/editor/contrib/gotoSymbol/referencesModel.ts#L144-L174
https://github.com/microsoft/vscode/blob/ea4d99921cc790d49194e897021faee02a1847f7/src/vs/editor/contrib/gotoSymbol/referencesModel.ts#L283-L285

We can add a workaround on our end for this. I expect that this should also be considered an issue on the VSCode side that should be fixed there as well.

@atscott atscott self-assigned this Feb 19, 2021
@atscott
Copy link
Collaborator

atscott commented Feb 19, 2021

The "Find all references" command is provided by the Reference Search View extension. It doesn't appear as though they have the same de-duplication logic there: https://github.com/microsoft/vscode-references-view/blob/f1b526b39c97981c81d52a98d6e66f8f699dc38a/src/references/model.ts#L63-L74
I'll see about submitting an issue and determining if this can be fixed in that extension rather than a workaround here. That would be the desired solution. Our extension provides valid references. It should be the responsibility of the editor / the "Reference Search View" extension to de-duplicate results from the various extensions which provide them.

@atscott
Copy link
Collaborator

atscott commented Feb 19, 2021

PR to fix in the vscode API: microsoft/vscode#117424
Issue in vscode repo: microsoft/vscode#117095

atscott added a commit to atscott/angular that referenced this issue Mar 1, 2021
…uests

VSCode only de-duplicates references results for "go to references" requests
but does not de-duplicate them for "find all references" requests. The
result is that users see duplicate references for results in TypeScript
files - one from the built-in TS extension and one from us.
While this is an issue in VSCode (see microsoft/vscode#117095)
this commit provides a quick workaround on our end until it can be addressed there.

This commit should be reverted when microsoft/vscode/issues/117095 is resolved.

fixes angular/vscode-ng-language-service#1124
atscott added a commit to atscott/angular that referenced this issue Mar 1, 2021
…uests

VSCode only de-duplicates references results for "go to references" requests
but does not de-duplicate them for "find all references" requests. The
result is that users see duplicate references for results in TypeScript
files - one from the built-in TS extension and one from us.
While this is an issue in VSCode (see microsoft/vscode#117095)
this commit provides a quick workaround on our end until it can be addressed there.

This commit should be reverted when microsoft/vscode/issues/117095 is resolved.

fixes angular/vscode-ng-language-service#1124
zarend pushed a commit to angular/angular that referenced this issue Mar 3, 2021
…uests (#41041)

VSCode only de-duplicates references results for "go to references" requests
but does not de-duplicate them for "find all references" requests. The
result is that users see duplicate references for results in TypeScript
files - one from the built-in TS extension and one from us.
While this is an issue in VSCode (see microsoft/vscode#117095)
this commit provides a quick workaround on our end until it can be addressed there.

This commit should be reverted when microsoft/vscode/issues/117095 is resolved.

fixes angular/vscode-ng-language-service#1124

PR Close #41041
@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 Apr 3, 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