-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix early attribute decoding when an argument is interpolated string #64612
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
|
Tagging @333fred for review (since you were assigned the issue). Thanks! |
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.
Done review pass (commit 2)
| } | ||
| } | ||
| [Obsolete($"Do not use {nameof(LegacyObject1)}")] |
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.
Let's add some dedicated tests for when the interpolated string has non-constant underlying components in this location.
|
Unfortunate: it looks like this change has caught actual instances of this in roslyn itself. Given that, we'll need a test insertion of this PR to see whether it breaks the VS build. |
Let me know the result of the test insertion please. Thanks! |
|
What is meant by "a test insertion"? Thank you |
I'm not the best to talk about it since it's something internal in Microsoft, but as far as I know, it checks how VS build goes with the compiler change made in this PR. |
A "test insertion" does a few things but the one most relevant here is that it builds the entire VS code base with the compiler that results from taking this change. The VS code base is both huge and has projects that were developed at all points in the C# history so it has a wide breadth of usage for all the features that we've done. It's an excellent test bed for scouting how disruptive a change will or won't be. Also just really good at shaking out bugs in the compiler. Our ability to ship in VS is predicated on our ability to build VS. When there is a change that potentially causes a build break in VS we first do a "test insertion" to see how bad it will be and determine if we need to do any pre-work in the VS repo to accept this change. |
|
Test Insertion Pipeline: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=6809216&view=results (internal only) |
|
@dotnet/roslyn-ide can we have a quick review? |
| /// Immutable snapshot of language services from the host environment associated with this project's language. | ||
| /// Use this over <see cref="LanguageServices"/> when possible. | ||
| /// </summary> | ||
| #pragma warning disable CS0618 // Type or member is obsolete. Use Services instead. - This is the implementation of Services. |
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.
So this was needed now because the compiler previously wasn't processing the Obsolete attribute during the source build?
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.
Yes the compiler didn't produce obsolete diagnostics when the attribute argument was interpolated string constant. This error was caught in the boostrapping build.
|
Thanks @Youssef1313! |
Fixes #64605