-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Background
Marked as blocking-partner since a first-party partner is having trouble with deployment due to this.
In .NET Core 3.x, we made a change to how Encoder.Convert and Decoder.Convert work in order to fix how the completed parameter's values are set on output and to bring the methods in line with the Remarks section of the documentation. See https://github.com/dotnet/coreclr/issues/23020 and https://github.com/dotnet/coreclr/issues/27191 for the original bugs.
Unfortunately the sample code in the Examples section of the documentation relies on the old non-compliant behavior of these methods, and it's leading to regressions in applications which have used that sample code. See https://github.com/dotnet/corefx/issues/42423 for one example, where the application enters an infinite loop on some inputs.
Proposed behavioral change
The proposal is to restore the completed output parameter logic that was present in Full Framework and .NET Core 1.x / 2.x.
We've already identified some call sites that might regress as a result of backing out these changes, and work items are open for those issues. See dotnet/aspnetcore#17747 for one example.