-
Notifications
You must be signed in to change notification settings - Fork 164
Add spec for obsoletions in .NET 5 #139
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
https://aka.ms/dotnet-warnings/MSLIB0004 doesn't work yet? |
@Happypig375 Thanks for checking that. We'll get the URLs working before shipping the GA release in November. |
…onState; use existing CAS DiagnosticId
For CAS related items, the documented says "all [classes] from the It looks like the whole of the
There are also some CAS types in CorLib like If not all CAS types are obsoleted, it may be worth giving a rationale in the document. |
That's a good point. The obsoletions should probably include everything that subclasses |
|
@jeffhandley Yeah, I'd also add |
This comment is no longer valid. @GrabYourPitchforks I'm considering keeping
That is currently applied to What do you think? Should we obsolete it that way, assign it into the CAS DiagnosticId, or omit it from the obsoletions list? |
This link has information specific to .NET Framework 2.0 -> .NET Framework 4.0 specific CAS breaking change that is not relevant to .NET Core. We should delete it in .NET Core and supersede it with bulk CAS obsoletion. I think we should:
|
@jkotas / @GrabYourPitchforks - I went ahead and combined the PrincipalPermission and PermissionState into the CAS category. |
I've also made a list of candidate Obsolete APIs a few months back: dotnet/runtime#33360 |
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, perhaps it would be worth noting why some things aren't on this list that were in the original discussions eg SecureString. I assume because it's intended to be a small start to prove the mechanism that focuses on the most obvious cases.
@danmosemsft @Joe4evr - I just added an "Other Considerations" section that talks to why we chose the APIs we did for .NET 5. |
* `System.Security.Cryptography.SymmetricAlgorithm.Create()` | ||
* `System.Security.Cryptography.AssymetricAlgorithm.Create()` | ||
* `System.Security.Cryptography.HMAC.Create()` | ||
* `System.Security.Cryptography.KeyedHashAlgorithm.Create()` |
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.
@bartonjs HashAlgorithm.Create()
also throws (and there's a unit test including it in the same list as these others). Should we obsolete it as well?
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.
HashAlgorithm.Create() also throws (and there's a unit test including it in the same list as these others). Should we obsolete it as well?
Yep.
Review notes:
|
Thanks, @terrajobst.
I will keep Sorry @GrabYourPitchforks -- this will steal |
The way it's playing out with
We cannot put errors on types because of our type forwarding infrastructure--the type forward files would then fail to build because they are referencing types that have obsoletions as errors, which cannot be suppressed. We cannot put all of the new diagnostics on constructors since we're obsoleting the interfaces; the types themselves need to then be obsoleted as well. |
They don't need to be adjacent. In fact, being not adjacent early on will show that we don't care about such trivialities. |
Yeah, let's not do unnatural acts for aesthetics. We can't keep it up anyways. We should think of SYSLIBXXXX as an opaque ID. |
Good point -- sorry I had already moved forward with that. BinaryFormatter needed to change from |
Thread.Suspend seems to be missing (it's unsupported along with |
|
Depends. If we're changing diagnostic IDs for already shipped obsolete messages, we probably want to consider this separately. I'm not opposed to that, but we shouldn't do one-offs without considering the larger picture. If we only shipped the obsoletions in a preview of .NET 5, feel free to change it. |
No description provided.