Skip to content

[5.5][CodeCompletion] Fine grained prioritization #37878

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
merged 7 commits into from
Jun 21, 2021

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jun 11, 2021

Cherry-pick #37725 and #37834 into release/5.5

rintaro added 2 commits June 10, 2021 20:48
To describe fine grained priorities.

Introduce 'CodeCompletionFlair' that is a set of more descriptive flags for
prioritizing completion items. This aims to replace '
SemanticContextKind::ExpressionSpecific' which was a "catch all"
prioritization flag.

(cherry picked from commit 6dd5d94)
@rintaro rintaro requested a review from a team as a code owner June 11, 2021 03:57
@rintaro
Copy link
Member Author

rintaro commented Jun 11, 2021

@swift-ci Please test

@rintaro rintaro added the r5.5 label Jun 11, 2021
@swift-ci

This comment has been minimized.

@swift-ci

This comment has been minimized.

rintaro added 5 commits June 10, 2021 22:19
* 'super' in a overriding decl is "common".
* type decl introducers (e.g. 'struct', 'enum') at top-level in library
  files are "common"
* type decl introducers in 'protocol' are invalid, hence "rare"
* top-level only decl introducer (e.g. 'import', 'extension') are invalid
  at non-top-level, hence "rare"
* nested types in function bodies are "rare"
* member only decls (e.g. 'subscript', 'deinit') are invalid in function
  body, hence "rare"
* some modifiers (e.g. 'public', 'private', 'override') are invalid for
  local decls, hence "rare"

rdar://77934651
(cherry picked from commit a2b5968)
* Starting a statement with a protocol name is rare
* Starting a statemnet at top-level of non-script file is invalid

rdar://77934897
(cherry picked from commit 1855e1a)
…cept

SourceFile as the decl context.

(cherry picked from commit 5d5b93d)
…d results

Instead, allocate new `CodeCompletionResult` in the current sink.

(cherry picked from commit f553826)
@rintaro rintaro force-pushed the 5.5-ide-completion-flair branch from 901a737 to 5869b40 Compare June 11, 2021 05:20
@rintaro
Copy link
Member Author

rintaro commented Jun 11, 2021

@swift-ci Please test

@tkremenek tkremenek merged commit 5c8daca into swiftlang:release/5.5 Jun 21, 2021
@rintaro rintaro deleted the 5.5-ide-completion-flair branch July 6, 2021 20:13
@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.

4 participants