-
Notifications
You must be signed in to change notification settings - Fork 400
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
fix duplicate results when search for * #2547
Conversation
Signed-off-by: Shi Chen <chenshi@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we really need to fix it this way, we could but there's one regression that might be introduced. The problem is you can't really see it on the VS Code side because of microsoft/vscode#149144 .
Something like java.util.function.*
returns results from the LS, but VS Code would fail to display anything. With this change, the above query returns empty results in the LS also. To me, the query should return something in an ideal world 😛 .
Is there any reason this issue can't be solved by just making a temporary symbol set, and then converting to a symbol list (to satisfy the API)
@rgrunber you're right. The current fix will return an empty array. Why I didn't use a temporary set is I'd like to reduce an unnecessary search, but it's now tricky to set the condition to "exclude" the search. I would update this commit in the set/list way. |
Signed-off-by: Shi Chen <chenshi@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I would just confirm that test failure in WorkspaceSymbolHandlerTest
was just a random failure. Couldn't reproduce locally. Feel free to squash+merge after.
I think this cause some issue in https://ci.eclipse.org/ls/job/jdt-ls-master/1625/testReport/ . at |
I can't reproduce it locally. Is it related to the platform? |
I wasn't able to reproduce in an IDE, but if I run with
Update: : I see the test does a search and gets the first entry .. maybe we've disturbed the ordering. Might be a simple fix to make the test more resilient. It's an easy fix. There are |
fix #2938