-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Mark DirectoryServices CAS APIs as Obsolete #40756
Mark DirectoryServices CAS APIs as Obsolete #40756
Conversation
Note regarding the 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. |
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
There are a bunch of failures like:
I'm unsure if/how this PR could have caused that; can someone with more infrastructure and/or ApiCompat knowledge assess that? |
This is #40416 . It is taking down a large share of PRs. |
src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.DirectoryServices/ref/System.DirectoryServices.manual.cs
Outdated
Show resolved
Hide 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.
Other than addressing @jkotas comments this looks good.
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.
Other than @jkotas feedback and probably adding a shared hook to include the ObsoleteAttributes (like we do for PlatformAttributes), looks good.
Fixes #39413. Per dotnet/designs#139, we want to mark
System.DirectoryServices.DirectoryServicesPermission
andSystem.DirectoryServices.DirectoryServicesPermissionAttribute
as obsolete in .NET 5 (as part of obsoleting the Code Access Security APIs).These two typeswere not marked in #39269 because
System.DirectoryServices
does not have a build specific to .NET 5.0, as was reported in #39401. The discussion there landed on a solution for these APIs of using aninternal ObsoleteAttribute
withinSystem.DirectoryServices
, so long as the tooling would respect the internal attribute--it does.The approach taken here is to:
ObsoleteAttribute.cs
intoSystem.DirectoryServices
(src and ref projects)internal
forObsoleteAttribute
when not built as part of corelibObsoleteAttribute
being used locally instead of from the referenceObsoletions.cs
intoSystem.DirectoryServices
(src)System.DirectoryServices
hasn't yet been annotated for nullability, we also need to include#nullable enable
in theObsoleteAttribute.cs
within the#ifdef
.