fix: migrate validation to ReactiveUI primitives#933
Merged
glennawatson merged 3 commits intoJun 30, 2026
Conversation
Core changes: - Align validation context scheduler and disposable APIs with ReactiveUI.Primitives. - Keep DynamicData/System.Reactive interop localized where observable combination is required. - Harden observable validation constructor input handling. Samples: - Update WPF and WinForms activation bindings to use primitives MultipleDisposable registration. - Remove stale ReactiveUI.Avalonia bridge usage and bind the Avalonia login sample through Avalonia bindings plus ValidationContext subscriptions. Tests and API approvals: - Move test scheduler usage to ImmediateSequencer. - Refresh API approval baselines for the primitives public API surface. Validation: - dotnet build ReactiveUI.Validation.slnx -c Release - dotnet test --solution ReactiveUI.Validation.slnx -c Release - dotnet test --project tests/ReactiveUI.Validation.Tests/ReactiveUI.Validation.Tests.csproj -c Release -- --coverage --coverage-output-format cobertura --disable-logo --no-progress
## Changes - Disable native apphost generation for test projects because Microsoft Testing Platform runs the test assemblies directly and the .NET preview SDK CI build was failing while copying missing apphost files on Ubuntu. - Update ReactiveValidationObject scheduler XML docs to reference the ReactiveUI.Primitives CurrentThreadSequencer type. ## Verification - dotnet build ReactiveUI.Validation.slnx -c Release - dotnet test --solution ReactiveUI.Validation.slnx -c Release -- --coverage --coverage-output-format cobertura --disable-logo --no-progress
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #933 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 668 665 -3
Branches 113 114 +1
=========================================
- Hits 668 665 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
## Changes - Add a TUnit constructor guard test for ObservableValidation when the source observable is null. - Cover the constructor branch Codecov reported as partially covered on the PR diff. ## Verification - Targeted TUnit test passed across net8.0, net9.0, and net10.0. - Full TUnit coverage run passed with 576 tests. - MTP Cobertura query confirmed no missed coverage for ObservableValidationBase.
glennawatson
approved these changes
Jun 30, 2026
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.
What kind of change does this PR introduce?
Bug fix / migration update for the ReactiveUI.Validation move to ReactiveUI.Primitives-based ReactiveUI packages.
What is the new behavior?
MultipleDisposableactivation registration.ReactiveUI.Avaloniabridge; the login sample uses Avalonia bindings with direct validation context subscriptions.What is the current behavior?
The solution fails to build after the ReactiveUI update because some code still assumes System.Reactive scheduler/disposable APIs and stale platform adapter behavior. API approvals also reflect the old scheduler/disposable public shape.
Checklist
Additional information
Validation performed from
src:dotnet build ReactiveUI.Validation.slnx -c Releasedotnet test --solution ReactiveUI.Validation.slnx -c Releasedotnet test --project tests/ReactiveUI.Validation.Tests/ReactiveUI.Validation.Tests.csproj -c Release -- --coverage --coverage-output-format cobertura --disable-logo --no-progressThe MTP coverage report for net10 reported 99.85% line coverage and 99.64% branch coverage.