Fix CommandArgumentEnumerator behavior for .NET 8#544
Closed
thomaslevesque wants to merge 1 commit intonatemcmaster:mainfrom
Closed
Fix CommandArgumentEnumerator behavior for .NET 8#544thomaslevesque wants to merge 1 commit intonatemcmaster:mainfrom
thomaslevesque wants to merge 1 commit intonatemcmaster:mainfrom
Conversation
e44d5fc to
5b1d19f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #544 +/- ##
==========================================
- Coverage 82.34% 77.86% -4.49%
==========================================
Files 105 105
Lines 3308 3311 +3
Branches 0 717 +717
==========================================
- Hits 2724 2578 -146
+ Misses 584 580 -4
- Partials 0 153 +153 ☔ View full report in Codecov by Sentry. |
Contributor
Author
|
Closing in favor of #542 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #541
There's been a breaking change in .NET 8. The behavior for
IEnumerator.Current, which has always been undefined when called afterMoveNext()returned false, has changed from "return the last value" to "throw an exception". So instead of calling_enumerator.Currentevery timeCurrentis invoked, we now store the value of_enumerator.Currentafter_enumerator.MoveNext()returned true.I also added the
net8.0TFM to the unit tests to validate the behavior is now correct on .NET 8.