-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[release/5.0] Obsolete WebRequest, ServicePoint and WebClient #41526
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
Co-authored-by: Cory Nelson <phrosty@gmail.com>
|
Tagging subscribers to this area: @dotnet/ncl |
jeffhandley
left a comment
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.
I have some changes requested to be more consistent with the other obsoletions and to add the obsoletion to our list of obsoletions.
Before we can merge this into release/5.0 (RC1), we also need to do a few extra steps:
- Treat this as a breaking change
- Once the breaking change document is merged into master, socialize it internally (ping me offline and I can share the list of people/teams that should be notified)
The feedback on this PR will of course need to be applied to master first too.
| internal const string CodeBaseMessage = "Assembly.CodeBase and Assembly.EscapedCodeBase are only included for .NET Framework compatibility. Use Assembly.Location instead."; | ||
| internal const string CodeBaseDiagId = "SYSLIB0012"; | ||
|
|
||
| internal const string WebRequestMessage = "Use HttpClient instead."; |
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.
We just updated the CodeBaseMessage to provide more context on the message. Please expand this message in a similar fashion. This will of course need to be updated throughout the ref assemblies as well.
The need for this becomes more obvious when adding the the obsoletion to the list of obsoletions, which also needs to be done.
| <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks> | ||
| <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> | ||
| <IgnoreForCI Condition="'$(TargetOS)' == 'Browser'">true</IgnoreForCI> | ||
| <NoWarn>$(NoWarn);SYSLIB0014</NoWarn> |
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.
Suggestion: add a comment indicating what SYSLIB0014 is. We tried to do that with the other SYSLIB obsoletions.
| <PropertyGroup> | ||
| <IncludeRemoteExecutor>true</IncludeRemoteExecutor> | ||
| <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks> | ||
| <NoWarn>$(NoWarn);SYSLIB0014</NoWarn> |
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.
Suggestion: leave a comment here; same as above.
| <PropertyGroup> | ||
| <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks> | ||
| <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> | ||
| <NoWarn>$(NoWarn);SYSLIB0014</NoWarn> |
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.
Suggestion: leave a comment
|
This change will require upstack teams to react. Are we prepared to do that in time for RC1? |
The only way to know for sure is to survey the impact. We have been doing that for other late breaking changes.
I'll be happy to share with @aik-jahoda some more details if we want to consider working through that to get this in. |
|
I've chatted with a few folks and we're of the mind that this is too late to be adding this into 5.0. Let's still keep it in 6.0 and make sure it is complete early to give folks the message in previews. |
|
Closing the PR as we decided to Won't Fix it in 5.0. |
Backport of #41400 to release/5.0
Fixes #33125
/cc @aik-jahoda
Customer Impact
Construction of WebRequest, ServicePoint and WebClient will produce a warning:
SYSLIB0014Use HttpClient instead.The warning will hit any customer who didn't migrate to HttpClient yet.
The impact is reduced by obsoleting the factory methods, and not the classes. It means the usage of the classes will be without warning, but customer will have enough information where to start with migration.
Testing
Usage of the api produce the compile time warning.
Risk
Customers with warning as errors needs to do a code change/project change. Customer will have to migrate or suppress this specific warning.