Repository navigation
Obsolete Socket.UseOnlyOverlappedIO - #52475
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. |
|
Tagging subscribers to this area: @dotnet/ncl Issue Detailsclose #47163
|
| using Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); | ||
|
|
||
| Assert.False(s.UseOnlyOverlappedIO); | ||
| s.UseOnlyOverlappedIO = true; |
There was a problem hiding this comment.
We need to keep some of the tests around, with the warning disabled around the use in tests.
We need to make sure that it still works as expected even once it is obsolete.
There was a problem hiding this comment.
How can I add pragma warning disable without diagnstic id?
There was a problem hiding this comment.
Oh, I can use CS0618
Okay, I'll return tests 👍
There was a problem hiding this comment.
antonfirsov
left a comment
There was a problem hiding this comment.
Thanks for taking the time for this! We need to include .NET 5+ in the obsoletion messages, otherwise looks good.
Co-authored-by: Anton Firszov <antonfir@gmail.com>
| [System.ObsoleteAttribute("SupportsIPv6 is obsoleted for this type, please use OSSupportsIPv6 instead. https://go.microsoft.com/fwlink/?linkid=14202")] | ||
| public static bool SupportsIPv6 { get { throw null; } } | ||
| public short Ttl { get { throw null; } set { } } | ||
| [System.ObsoleteAttribute("This property has no effect in .NET 5+ and .NET Core.")] |
There was a problem hiding this comment.
@terrajobst, we really need a better way to refer to this :) For anything that started off in .NET Core, are we now going to have to say .NET Core and .NET 5+?
There was a problem hiding this comment.
The official guide suggests to refer to it as
".NET" (without mention of 5 or Core)
which would be terribly confusing in this case. ("This property has no effect in .NET" 🤷)
There was a problem hiding this comment.
would be terribly confusing in this case
Right, but so is ".NET 5+ and .NET Core", as it incorrectly implies that .NET 5 isn't .NET Core.
cc: @richlander
There was a problem hiding this comment.
".NET" (without mention of 5 or Core)
When you need to emphasize specific implementation (the case here), the guide suggests to use ".NET 5+ (and .NET Core)" for first reference and ".NET 5+" for subsequent references.
This guide was created just recently. I did not know about that. @antonfirsov thank you for sharing the link. There is a ton of places everywhere that use the phrase like the one used by this PR that was de-facto standard before.
There was a problem hiding this comment.
the guide suggests to use ".NET 5+ (and .NET Core)"
Actually, it suggests:
.NET 5 (and .NET Core) and later versions
which is terribly verbose (at a level that makes it obscure IMO), this is why I went with .NET 5+ and .NET Core. I believe we should revisit that guide.
Right, but so is ".NET 5+ and .NET Core", as it incorrectly implies that .NET 5 isn't .NET Core.
@stephentoub although from internal (dotnet/runtime developer) perspective .NET 5 ⊂ .NET Core (being just another release), from what I see from the guide, this is not what's being communicated on the branding front.
Maybe we should open a tracking issue, to revisit the terminology? If yes where?
There was a problem hiding this comment.
.NET 5 (and .NET Core) and later versions
"and later versions" is the standardized docs terminology. Yes, it is verbose and it is often abbreviated. Perhaps the guide should mention the .NET 5+ abbreviation as an option. For example, this abbrevation is often used in https://github.com/dotnet/dotnet-api-docs currently.
Maybe we should open a tracking issue, to revisit the terminology? If yes where?
The docs repo. The document that describes the terminology is there.
close #47163