Skip to content

[5.3][CodeCompletion] Fix issue in dependency checking for the editing file #33210

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 Jul 30, 2020

Cherry-pick of #33200 into release/5.3

  • Explanation: Fix an issue where fast-completion is disabled when the current editing file is saved in the file system. Previously it used SM.getCodeCompletionBufferID() as the "current editing file ID" but that is not correct because it points the buffer of the previous completion. We need to use getBufferID() of CI.getCodeCompletionFile() instead.
  • Scope: Code completion
  • Risk: Low
  • Testing: Added regression test case
  • Issue: rdar://problem/66301353
  • Reviewer: Argyrios Kyrtzidis (@akyrtzi)

'SM.getCodeCompletionBufferID()' returns the buffer ID of the previous
code completion. 'CI.getCodeCompletionFile()->getBufferID()' always
returns the original source buffer ID of the current file in the main
module. The latter is needed for excluding buffer ID for dependency checking.

rdar://problem/66301353
(cherry picked from commit 2f4dcf3)
@rintaro rintaro added the r5.3 label Jul 30, 2020
@rintaro rintaro requested a review from a team as a code owner July 30, 2020 17:45
@rintaro
Copy link
Member Author

rintaro commented Jul 30, 2020

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 6ab40f2

@akyrtzi
Copy link
Contributor

akyrtzi commented Jul 30, 2020

@swift-ci test OS X platform

@rintaro
Copy link
Member Author

rintaro commented Jul 30, 2020

@swift-ci Please nominate

1 similar comment
@rintaro
Copy link
Member Author

rintaro commented Jul 30, 2020

@swift-ci Please nominate

@akyrtzi akyrtzi merged commit 5ad3d0e into swiftlang:release/5.3 Jul 30, 2020
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks 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.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants