Skip to content

fix(blazor): migrate to ReactiveUI.Primitives.Blazor - #4445

Merged
ChrisPulman merged 2 commits into
mainfrom
CP_blazor-primitives-scheduler-migration
Aug 18, 2026
Merged

fix(blazor): migrate to ReactiveUI.Primitives.Blazor#4445
ChrisPulman merged 2 commits into
mainfrom
CP_blazor-primitives-scheduler-migration

Conversation

@ChrisPulman

@ChrisPulman ChrisPulman commented Aug 18, 2026

Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

This is a Blazor scheduler and dependency compatibility fix. It migrates the Blazor packages from Reactive.Wasm to ReactiveUI.Primitives.Blazor and its System.Reactive variant, aligns required servicing dependencies, and adds lean/reactive regression coverage plus a runnable WebAssembly example.

closes #4430

What is the new behavior?

  • Blazor WebAssembly uses WasmSequencer.Default in the lean package and WasmScheduler.Default in the System.Reactive package.
  • Blazor Server retains the current-thread fallback; renderer-affine work remains component-scoped through ComponentBase.InvokeAsync, avoiding an invalid process-wide renderer dispatcher.
  • WithBlazorWasm() consistently configures core services, the WASM main scheduler, the task-pool scheduler, and Blazor platform registrations.
  • ASP.NET, Microsoft.Extensions.*, System.Text.Json, and WebAssembly package versions satisfy the ReactiveUI.Primitives 7.2.0 servicing floors.
  • A Blazor WebAssembly scheduler-probe example and reactive Blazor test project validate both package seams.

What is the current behavior?

The Blazor projects depend on the removed Reactive.Wasm package and do not provide equivalent lean/reactive validation. After updating to ReactiveUI.Primitives 7.2.0, lower central ASP.NET, System.Collections.Immutable, and System.Text.Json pins cause package-downgrade restore failures.

Checklist

  • Tests have been added or updated (for bug fixes / features)
  • Docs have been added or updated (for bug fixes / features)
  • Changes target the main branch
  • PR title follows Conventional Commits

Additional information

Root-cause fixes were made without adding warning suppressions, NoWarn, pragmas, warning demotion, or analyzer exclusions.

Validation completed:

  • Full solution restore and build: 0 warnings, 0 errors
  • ReactiveUI.Blazor.Tests: 38/38 passed
  • ReactiveUI.Blazor.Tests.Reactive: 11/11 passed
  • ReactiveUI.Splat.Tests: 6/6 passed
  • ReactiveUI.Tests: 2,024/2,024 passed
  • ReactiveUI.Tests.Reactive: 2,024/2,024 passed
  • ReactiveUI.Builder.Tests: 187/187 passed
  • BlazorReactiveUIBuilderExtensions: 100% line coverage in lean and reactive reports
  • git diff --check: clean

Scheduler migration:

- Replace Reactive.Wasm with the lean and System.Reactive Primitives Blazor packages.
- Use the WebAssembly sequencer/scheduler without creating an invalid renderer dispatcher.
- Configure core, main-thread, task-pool, and Blazor platform services consistently.

Validation coverage:

- Add lean and reactive scheduler regression coverage.
- Add a runnable Blazor WebAssembly scheduler example and include it in the solution.

Dependency servicing:

- Align ASP.NET, Microsoft.Extensions, System.Text.Json, and WebAssembly servicing versions with ReactiveUI.Primitives 7.2.0.
@ChrisPulman
ChrisPulman marked this pull request as ready for review August 18, 2026 00:38
The Blazor WebAssembly example was rewritten from top-level statements to a named Program class with an explicit Main method. This keeps startup logic explicit and consistent with the generated host pattern while preserving the existing builder setup and app bootstrapping.
@ChrisPulman
ChrisPulman enabled auto-merge (squash) August 18, 2026 00:58
@sonarqubecloud

Copy link
Copy Markdown

@ChrisPulman
ChrisPulman merged commit feeba90 into main Aug 18, 2026
11 checks passed
@ChrisPulman
ChrisPulman deleted the CP_blazor-primitives-scheduler-migration branch August 18, 2026 01:42
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.92%. Comparing base (e227460) to head (0f1434d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4445      +/-   ##
==========================================
+ Coverage   93.89%   93.92%   +0.03%     
==========================================
  Files         359      359              
  Lines       15104    15105       +1     
  Branches     1568     1568              
==========================================
+ Hits        14182    14188       +6     
+ Misses        679      674       -5     
  Partials      243      243              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ReactiveUI.Blazor still have dependency of System.Reactive

2 participants