MudRadio: Fix Stack overflow caused by recurrence.#8412
MudRadio: Fix Stack overflow caused by recurrence.#8412mikes-gh merged 2 commits intoMudBlazor:devfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8412 +/- ##
=======================================
Coverage 88.87% 88.88%
=======================================
Files 414 414
Lines 12292 12292
Branches 2455 2455
=======================================
+ Hits 10925 10926 +1
+ Misses 837 836 -1
Partials 530 530 ☔ View full report in Codecov by Sentry. |
|
Hi. Thanks for contribution.
It says unit tests, but I don't see any new unit tests and our current unit tests didn't cover this issue. |
|
Awesome. How did our unit tests not catch that? Clearly there is a hole in the test suite. Will you please add a simple test that goes into stack overflow without the fix? Thanks! Edit: Haha, you beat me @ScarletKuro |
All UnitTests covering Option was changed to Value. There are no tests for Option anymore, and therefore it passed :) |
I will write a test for it now |
|
When making backwards compatibility changes, we should always keep the old tests. That was an error on the previous PR. Perhaps you can look at the previous PR and resurrect them. You may have to pragma the obsolete usage. I suspect that the PR that made the changes also did the same for the other components that were changed to Value. |
Oh, I see now how this regression happened. It was introduced in this PR #7892, specifically this file change https://github.com/MudBlazor/MudBlazor/pull/7892/files#diff-dc31ee09bdb8429effe29754907962c4f424a061132113699e2f83ae05943588 |
|
Added a single test for it now. I guess that is good enough, as it is a simple fix. I tried first without the fix, and it just ran until it stopped without any good feedback on what happened. It does not pass. After the change to return Value, it passes :) |
I think that's good enough, imo. |
|
@ScarletKuro Is it possible to create a v6.18.1 or a prerelease that includes this fix? |
|
I will simply make a release now. It'll be on nuget shortly |
* change getter method of MudRadio.Option to return Value * add test that Option still works after it was set to Obsolete
This change will make MudRadio.Option return Value instead of Option. This causes recurrence and results in Stack overflow exception.
Description
Fixes: #8411
How Has This Been Tested?
UnitTests
Types of changes
Checklist:
dev).