Skip to content
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

Remove old fwlink from Obsolete messages and make message improvements #56690

Merged
merged 11 commits into from
Aug 4, 2021
Merged

Remove old fwlink from Obsolete messages and make message improvements #56690

merged 11 commits into from
Aug 4, 2021

Conversation

jeffhandley
Copy link
Member

Fixes #47255.

Removes from all messages the unhelpful fwlink that points to a "What's obsolete in the .NET Framework class library" page.

Takes a pass through all [Obsolete] APIs and makes the messages more consistent throughout.

Does not attempt to utilize the new UrlFormat property on the Obsolete attribute, as we don't have dedicated diagnostic IDs or landing pages for the affected APIs. Spot-checking the APIs with web searches was resulting in good hits in our docs and other sites.

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@jeffhandley
Copy link
Member Author

@jkotas Thanks for the review/feedback; do the additional changes from these two commits look good to you?

@jeffhandley
Copy link
Member Author

@danmoseley Would you mind reviewing this? (I believe @jkotas is unavailable to re-review this week).

@jeffhandley jeffhandley added this to the 6.0.0 milestone Aug 4, 2021
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -507,13 +507,13 @@ private bool SetApartmentState(ApartmentState state, bool throwOnError)
return SetApartmentStateUnchecked(state, throwOnError);
}

[Obsolete("Thread.GetCompressedStack is no longer supported. Please use the System.Threading.CompressedStack class")]
[Obsolete("Thread.GetCompressedStack has been deprecated. Use the System.Threading.CompressedStack class instead.")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should rather be [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]

Same for SetCompressedStack and System.Threading.CompressedStack

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, cool. It will be a very minor breaking change to switch the diagnostic ID, but I think it's appropriate here, as any usage of CAS would already need to be accommodated in the build.

I'll make that change as a separate PR so that we have an isolated breaking change.

@jeffhandley
Copy link
Member Author

The failing checks are infrastructure / networking issues and are unrelated.

@jeffhandley jeffhandley merged commit 895c99c into dotnet:main Aug 4, 2021
@jeffhandley jeffhandley deleted the jeffhandley/obsoletions branch August 4, 2021 20:15
@ghost ghost locked as resolved and limited conversation to collaborators Sep 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Developers are directed to helpful documentation for existing obsoletions
2 participants