Skip to content

[CodeCompletion] Only include results from other modules once #42529

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

Merged

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 21, 2022

In case of ambigous expression/global completions, we call getValueCompletionsInDeclContext multiple times for the amigous solutions to the constraint system. This can cause modules to be included multiple times in RequestedCachedResults and thus global results from these modules are reported multiple times. Make RequestedCachedResults a set so we don’t get duplicate results.

rdar://92048610

In case of ambigous expression/global completions, we call `getValueCompletionsInDeclContext` multiple times for the amigous solutions to the constraint system. This can cause modules to be included multiple times in `RequestedCachedResults` and thus global results from these modules are reported multiple times. Make `RequestedCachedResults` a set so we don’t get duplicate results.

rdar://92048610
@ahoppen ahoppen requested a review from rintaro April 21, 2022 08:49
@ahoppen
Copy link
Member Author

ahoppen commented Apr 21, 2022

@swift-ci Please smoke test

@bnbarham bnbarham merged commit f66d9bd into swiftlang:main Apr 21, 2022
@ahoppen ahoppen deleted the pr/no-duplicate-results-from-other-modules branch April 22, 2022 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants