Skip to content

[CodeComplete] Skip conjunction elements unrelated to code completion token 🚥 #59944 #59992

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

Closed
wants to merge 8 commits into from

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jul 10, 2022

Depends on #59944


This should improve performance of code completion inside result builders by not type checking conjunction elements that don’t affect code completion.

@ahoppen ahoppen force-pushed the pr/skip-conjunction-elements branch 2 times, most recently from 2dde79f to 8b8b768 Compare September 7, 2022 13:41
@ahoppen ahoppen changed the title WIP: Skip conjunction elements unrelated to code completion token [WIP 2] Skip conjunction elements unrelated to code completion token Sep 7, 2022
@ahoppen ahoppen force-pushed the pr/skip-conjunction-elements branch 3 times, most recently from 93cd473 to 69c306b Compare September 9, 2022 09:17
@ahoppen ahoppen changed the title [WIP 2] Skip conjunction elements unrelated to code completion token [WIP 2] Skip conjunction elements unrelated to code completion token 🚥 #59984 Jan 4, 2023
@ahoppen ahoppen force-pushed the pr/skip-conjunction-elements branch from 69c306b to d30cd06 Compare January 4, 2023 15:01
@ahoppen ahoppen changed the title [WIP 2] Skip conjunction elements unrelated to code completion token 🚥 #59984 [SemaSkip conjunction elements unrelated to code completion token 🚥 #59984 Jan 4, 2023
@ahoppen ahoppen changed the title [SemaSkip conjunction elements unrelated to code completion token 🚥 #59984 [CodeComplete] Skip conjunction elements unrelated to code completion token 🚥 #59984 Jan 4, 2023
@ahoppen ahoppen force-pushed the pr/skip-conjunction-elements branch from d30cd06 to 693f3e1 Compare January 4, 2023 15:09
@ahoppen
Copy link
Member Author

ahoppen commented Jan 4, 2023

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Jan 4, 2023

@swift-ci Please SourceKit stress test

@ahoppen ahoppen force-pushed the pr/skip-conjunction-elements branch from 693f3e1 to 0a71eb3 Compare February 2, 2023 14:47
@ahoppen
Copy link
Member Author

ahoppen commented Feb 2, 2023

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Feb 2, 2023

@swift-ci Please SourceKit stress test

@ahoppen ahoppen marked this pull request as ready for review February 2, 2023 14:48
@ahoppen ahoppen requested review from hborla and xedin as code owners February 2, 2023 14:48
@ahoppen ahoppen changed the title [CodeComplete] Skip conjunction elements unrelated to code completion token 🚥 #59984 [CodeComplete] Skip conjunction elements unrelated to code completion token Feb 2, 2023
@ahoppen
Copy link
Member Author

ahoppen commented Feb 2, 2023

@swift-ci Please SourceKit stress test

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I think this is worth a cherry-pick to 5.8

@@ -995,6 +995,10 @@ class SyntacticElementConstraintGenerator
}
}

if (cs.isForCodeCompletion() && !cs.containsIDEInspectionTarget(element)) {
Copy link
Contributor

@xedin xedin Feb 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could you please add a comment here with brief explanation why this is necessary?

@ahoppen ahoppen force-pushed the pr/skip-conjunction-elements branch from 0a71eb3 to 97817ba Compare February 6, 2023 22:38
@ahoppen ahoppen requested a review from slavapestov as a code owner February 6, 2023 22:38
@ahoppen
Copy link
Member Author

ahoppen commented Feb 6, 2023

@swift-ci Please SourceKit stress test

@ahoppen ahoppen force-pushed the pr/skip-conjunction-elements branch from 97817ba to 52756d1 Compare February 8, 2023 21:06
@ahoppen
Copy link
Member Author

ahoppen commented Feb 8, 2023

@swift-ci Please SourceKit stress test

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented Feb 8, 2023

@swift-ci Please SourceKit stress test

@ahoppen
Copy link
Member Author

ahoppen commented Feb 9, 2023

@swift-ci Please SourceKit stress test

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented Feb 9, 2023

@swift-ci Please SourceKit stress test

@ahoppen ahoppen changed the title [CodeComplete] Skip conjunction elements unrelated to code completion token [CodeComplete] Skip conjunction elements unrelated to code completion token 🚥 #59944 Feb 9, 2023
xedin and others added 8 commits February 11, 2023 19:19
Follow-up to swiftlang#63505

Since, when the type is not stated, a variable assumes the
type of its initializer that enables out-of-scope variables
to be nested inside of some other concrete type i.e. Optional.

Resolves: swiftlang#63455
…n application target whose result is not unused

This happens if the code completion expression initializes a variable in a multi-statement closure that doesn’t have LeaveClosureBodiesUnchecked set.
@ahoppen
Copy link
Member Author

ahoppen commented Feb 12, 2023

@swift-ci Please SourceKit stress test

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented Feb 13, 2023

@swift-ci Please SourceKit stress test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 17, 2023

This is now part of #63717

@ahoppen ahoppen closed this Mar 17, 2023
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.

2 participants