[release/5.0-rc2] Revert "Make Console.ReadKey() distinguish between CR and LF inputs" #42477
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #42470 to release/5.0-rc2
Customer Impact
Issue #42418 was reported as another regression related to Console on Unix. We do not see a clear fix other than reverting PR #37491, which introduced the regression. #37491 had also introduced #42333, which was fixed by #42371 (master) and ported into 5.0 RC2 with #42381.
Taking this revert PR will reintroduce the part of #802 that was originally fixed, and this will affect a partner team. However, that previous state is still overall more stable than where we are now.
Testing
We have verified manually that the issue as reported in #42418 has been fixed. The test is impractical to automate since it depends on no console IO having been previously made by the process. Also, manual tests have been included which validate the reverted CR/NL behaviour as documented in #802.
Risk
Medium. We considered reverting #37491 instead of taking #42371 into RC2, but we dismissed that option with the following comment:
Those risks still exist, so we consider this revert to be medium risk. However, given that we now have data that #37491 introduced multiple regressions (and there may be others), we favor taking this revert.