-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Caller of an async local function cannot expect any of the callee’s code to execute #64482
Conversation
…ode to execute Fixes dotnet#43697.
@RikkiGibson, @dotnet/roslyn-compiler Please review |
1 similar comment
@RikkiGibson, @dotnet/roslyn-compiler Please review |
Should we update the breaking change doc in this PR? |
|
||
if (!symbol.IsAsync) | ||
{ | ||
Meet(ref State, ref localFunctionState.StateFromTop); |
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.
Should we have a follow-up issue to track the decision to also perform this Meet when the call is "immediately awaited"?
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.
Should we have a follow-up issue to track the decision to also perform this Meet when the call is "immediately awaited"?
That is a language design change that I am not planning to champion at the moment.
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.
LGTM Thanks (iteration 1)
It looks like test insertion succeeded - https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=6814361&view=results |
That indicates success of creating the insertion, located at https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/429093. We should see the results for that by this afternoon. |
@@ -1,5 +1,32 @@ | |||
# This document lists known breaking changes in Roslyn after .NET 6 all the way to .NET 7. | |||
|
|||
## Caller of an async local function cannot expect any of the callee�s code to execute. |
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.
nit: GitHub diff shows some unicode character as the apostrophe for "callee's". Is that intentional? #Closed
|
||
***Introduced in Visual Studio 2022 version 17.5*** | ||
|
||
See https://github.com/dotnet/roslyn/issues/43697 for the rational. |
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.
typo: rationale #Closed
|
||
***Introduced in Visual Studio 2022 version 17.5*** | ||
|
||
See https://github.com/dotnet/roslyn/issues/43697 for the rational. |
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.
Consider adding a one sentence summary, maybe something like:
For definite assignment analysis, invocations of async local functions are no longer treated as being awaited and therefore the local function is not considered executed.
Let's send an email as FYI to compat council for new compat break.
It would be good to add a note to the spec even though it's an older/incomplete document, and tag Rex on the edit (so that definite assignment rules in standard can reflect this change as appropriate). #Closed
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.
Done with review pass (iteration 3)
New "insertion" creation https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_build/results?buildId=6822275&view=results |
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.
LGTM Thanks (iteration 5)
Fixes #43697.