reactiveui / ReactiveUI

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. ReactiveUI allows you to abstract mutable state away from your user interfaces, express the idea around a feature in one readable place and improve the testability of your application.
https://www.reactiveui.net
MIT License
8.11k stars 1.12k forks source link

Fixup InitRxUI to account for order of passed registration namespaces #3887

Open Metadorius opened 2 months ago

Metadorius commented 2 months ago

What kind of change does this PR introduce?

Bug fix?

What is the current behavior?

Originally the InitializeReactiveUI function didn't account for order of passed registration, because the allowed namespace dictionary was enumerated instead of the array (which is kind of backwards if you think about it).

What is the new behavior?

Order of the namespaces is preserved when registering.

What might this PR break? Multi-platform projects that rely on current non-determinant order may break because of different order of registrations.

Please check if the PR fulfills these requirements

Other information: Not sure on what kind of tests/docs are expected, so I am leaving it as draft for now, feel free to undraft if you feel this is OK.

glennawatson commented 2 months ago

we'll discuss as a team if we want to keep this PR.

If we bring it across would you be okay just adding some simple unit tests for it?

Metadorius commented 2 months ago

If we bring it across would you be okay just adding some simple unit tests for it?

Sure, I just was not sure what specifically needs to be tested here (or how, because the effect can vary in different setups), so would not mind an idea on what to write tests for.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.82%. Comparing base (d75f999) to head (2880317). Report is 124 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3887 +/- ## ========================================== + Coverage 59.03% 67.82% +8.78% ========================================== Files 160 138 -22 Lines 5847 4805 -1042 Branches 1031 777 -254 ========================================== - Hits 3452 3259 -193 + Misses 2007 1344 -663 + Partials 388 202 -186 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.