Skip to content

Conversation

@Youssef1313
Copy link
Member

Fixes #64605

@Youssef1313 Youssef1313 requested a review from a team as a code owner October 10, 2022 19:53
@ghost ghost added Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee. labels Oct 10, 2022
@Youssef1313
Copy link
Member Author

Tagging @333fred for review (since you were assigned the issue). Thanks!

Copy link
Member

@333fred 333fred left a 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)}")]
Copy link
Member

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.

@333fred
Copy link
Member

333fred commented Oct 10, 2022

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.

@Youssef1313
Copy link
Member Author

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!

@Youssef1313 Youssef1313 requested a review from a team as a code owner October 11, 2022 07:01
@MartyIX
Copy link
Contributor

MartyIX commented Oct 11, 2022

What is meant by "a test insertion"? Thank you

@Youssef1313
Copy link
Member Author

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.
If this PR will cause errors in VS build, they should be fixed first.

@jaredpar
Copy link
Member

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.

@333fred
Copy link
Member

333fred commented Oct 11, 2022

@333fred
Copy link
Member

333fred commented Oct 12, 2022

@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.
Copy link
Member

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?

Copy link
Member Author

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.

@333fred 333fred merged commit b81857c into dotnet:main Oct 12, 2022
@ghost ghost added this to the Next milestone Oct 12, 2022
@333fred
Copy link
Member

333fred commented Oct 12, 2022

Thanks @Youssef1313!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Obsolete-Attribute with interpolated string as message does not raise warnings

7 participants