-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CodeCompletion] Remove warning for 'async in non-concurrency context' #73628
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
[CodeCompletion] Remove warning for 'async in non-concurrency context' #73628
Conversation
@swift-ci Please smoke test |
if (IsAsync && !canCurrDeclContextHandleAsync) { | ||
return ContextualNotRecommendedReason::InvalidAsyncContext; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I’m missing something, we can remove IsAsync
from ContextFreeCodeCompletionResult
now.
This warnings don't give much benefits for developers. Code completion UI tends to show them unusable. But usually, developers can modify the context to accept async calls, e.g. by wrapping it with `Task { }` rdar://126737530
Same for 'async in non-concurrency' context
6e9eb59
to
79a7410
Compare
@swift-ci Please smoke test |
kind, associatedKind, opKind, roles, isSystem, isAsync, | ||
hasAsyncAlternative, string, moduleName, briefDocComment, | ||
kind, associatedKind, opKind, roles, isSystem, | ||
hasAsyncAlternative, string, moduleName, briefDocComment, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect formatting?
@@ -236,7 +236,6 @@ static bool readCachedModule(llvm::MemoryBuffer *in, | |||
auto diagSeverity = | |||
static_cast<CodeCompletionDiagnosticSeverity>(*cursor++); | |||
auto isSystem = static_cast<bool>(*cursor++); | |||
auto isAsync = static_cast<bool>(*cursor++); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you increment the completion cache version number?
@swift-ci Please smoke test |
This warnings don't give much benefits for developers. Code completion UI tends to show them unusable. But usually, developers can modify the context to accept async calls, e.g. by wrapping it with
Task { }
rdar://126737530