Skip to content

[5.5][CodeCompletion] Don't check 'InvalidAsyncContext' for imported globals #37594

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

rintaro
Copy link
Member

@rintaro rintaro commented May 21, 2021

Cherry-pick of #37591 into release/5.5

  • Explanation: InvalidAsyncContext depends on the decl context. That may case "sticky" not-recommended If it's cached for a non-async context. To workaround this, stop checking InvalidAsyncContext when collecting completion items for caching. Also consistently use the SourceFile as the decl context to avoid decl context specific behavior.
  • Scope: Code completion for imported global symbols.
  • Risk: Low
  • Testing: Added regression test cases
  • Issue: rdar://78315441
  • Reviewer: Ben Langmuir (@benlangmuir)

'InvalidAsyncContext' depends on the decl context. That may case
"sticky" not-recommended If it's cached for a non-async context.

To workaround this, stop checking 'InvalidAsyncContext' when collecting
completion items for caching. Also consistently use the 'SourceFile' as
the decl context to avoid decl context specific behavior.

rdar://78315441
(cherry picked from commit 0ce1faa)
@rintaro rintaro added the r5.5 label May 21, 2021
@rintaro
Copy link
Member Author

rintaro commented May 21, 2021

@swift-ci Please test

@rintaro rintaro requested a review from akyrtzi May 21, 2021 23:06
@rintaro rintaro merged commit 737d233 into swiftlang:release/5.5 May 22, 2021
@rintaro rintaro deleted the 5.5-ide-completion-cache-rdar78315441 branch June 9, 2021 23:15
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants