-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Save CustomAttributesBag before post decoding well known attributes. #64649
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
Conversation
This avoids infinite cycle in binding attributes for two or more different symbols. Fixes dotnet#64392.
|
@dotnet/roslyn-compiler Please review. |
|
@dotnet/roslyn-compiler Please review |
|
@dotnet/roslyn-compiler For the second review. |
| { | ||
| if (attributeMatchesOpt is null) | ||
| { | ||
| this.PostDecodeWellKnownAttributes(boundAttributes, attributesToBind, diagnostics, symbolPart, wellKnownAttributeData); |
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.
Why is it ok to move this from being unconditionally executed to only being executed if there's no matching filter? #Resolved
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.
Why is it ok to move this from being unconditionally executed to only being executed if there's no matching filter?
The only allowed side effect of this call is error reporting into diagnostics (from doc comment: "This method should not have any side effects on the symbol, i.e. it SHOULD NOT change the symbol state."), and this code path is the only code path that preserves the diagnostics.
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.
Thanks for the explanation.
333fred
left a comment
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 (commit 1)
This avoids infinite cycle in binding attributes for two or more different symbols.
Fixes #64392.