-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-MetaenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additions
Milestone
Description
Rationale
Immo Landwerth (@terrajobst) has proposed a mechanism to improve obsoleting APIs by extending ObsoleteAttribute, affectionally known as Better Obsoletion. Recently, that proposed addition was merged into the framework and the compilers honor the new properties as of dotnet/roslyn#42518. In light of this, it seems like a good idea to gather a list of APIs that should be considered for Better Obsoletion, so there's a central place to discuss/review/suggest these.
Obsolete APIs
This list is by no means exhaustive, but it'll kickstart the discussion.
The three examples from the design doc:
SecureString- Obsolete the SecureString type #30612HttpWebRequest(and related) - Obsolete old HTTP APIs #33125- Non-generic collections - (no issue)
A quick search for 'obsolete' in dotnet/runtime revealed these:
Uri.EscapeUriString- [Uri] Uri.EscapeUriString should be deprecated #31387- This comment by @karelz mentions there's a few other bad APIs on
Uri, but doesn't specify which.
- This comment by @karelz mentions there's a few other bad APIs on
Assembly.CodeBase- Mark Assembly.CodeBase as obsolete #31127RuntimeHelpers.OffsetToStringData- API proposal: Obsolete RuntimeHelpers.OffsetToStringData #31406(Handled in Add spec for obsoletions in .NET 5 designs#139)Thread.Abort- Request Thread.Abort to be marked [Obsolete] #28664IAsyncResult- Deprecate IAsyncResult #27936HandleProcessCorruptedStateExceptionsAttribute- Consider marking HandleProcessCorruptedStateExceptionsAttribute as obsolete/hidden #31157BinaryFormatter- Remove BinaryFormatter from the shared framework in .NET 5 #29976StringDictionary- Mark StringDictionary as obsolete #889UTF-7 Encoding - Proposal: Obsolete UTF-7 encoding in the framework #32284(Handled in Obsolete Encoding.UTF7 property and UTF7Encoding ctors #37535)(Handled in Add spec for obsoletions in .NET 5 designs#139)PrincipalPermissionAttribute(and related) - Non-support of PrincipalPermissionAttribute #31279
Other APIs to be considered:
implicit operator DateTimeOffset(DateTime)- Feature proposal: remove implicit construction of DateTimeOffset from DateTime #32954UnmanagedType.AnsiBStr(and a few others) - UnmanagedType.AnsiBStr is marked as obsolete with no alternative given #31006- These values are already marked obsolete, but it would be an improvement to give them a dedicated diagnostic ID.
reflectronic, strangeman375, erictuvesson, saucecontrol and slavanap
Metadata
Metadata
Assignees
Labels
area-MetaenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additions