feat: add Rx compatibility operators#63
Draft
ChrisPulman wants to merge 6 commits into
Draft
Conversation
API surface: - Add Rx-compatible Signal aliases for Return, Empty, Never, Throw, Timer, Merge, and Switch. - Add async Create/Defer overloads, indexed Select/MapIndexed, Task ToObservable/ToSignal, task Concat/Chain, scheduler-aware ToObservable, and object Synchronize/SynchronizeObject support. - Update public API baselines for ReactiveUI.Primitives and ReactiveUI.Primitives.Reactive. Build and test fixes: - Fix generate-publicapi.ps1 path construction under Windows PowerShell. - Disambiguate tests after the new overloads. - Disable the WindowsAppSDK Undocked RegFree WinRT auto-initializer for WinUI tests to avoid compiling package source that violates CA5392 while preserving self-contained dispatcher tests.
Operators: - add Rx-name aliases for Publish, Replay, RefCount, SubscribeSafe, StartWith, Buffer, Finally, Throttle, Catch, SelectMany, and Merge - add bounded enumerable Blend/Merge support so migrated DynamicData pipelines can avoid local ReactiveCompatibility operators - add cleanup argument validation for Finally/OnCleanup parity Public API: - regenerate ReactiveUI.Primitives and ReactiveUI.Primitives.Reactive shipped API baselines for all target frameworks Tests: - add TUnit coverage for DynamicData migration aliases, SubscribeSafe failure handling, bounded Merge, Buffer, Throttle, and Finally Validation: - built ReactiveUI.Primitives, ReactiveUI.Primitives.Reactive, DynamicData, DynamicData.Reactive, and the solution - ran ReactiveUI.Primitives.Tests net10.0 executable: 391/391 passed
Update StyleSharp.Analyzers package version from 3.11.1 to 3.11.2 in src/Directory.Packages.props to pick up the patch release.
Review comments: - address generic catch review threads by filtering fatal runtime exceptions before converting ordinary delegate/enumerator failures to OnError Implementation: - add a shared FatalExceptionHelper used by Connectable Publish, bounded Blend/Merge, MapIndexed, SubscribeSafe, and enumerable SelectMany Validation: - dotnet build ReactiveUI.Primitives net8.0 - dotnet build ReactiveUI.Primitives.Reactive net8.0 - dotnet build ReactiveUI.Primitives.Tests net10.0 - ReactiveUI.Primitives.Tests net10.0 executable: 391/391 passed
CI: - add Android-generated Resource type baselines for ReactiveUI.Primitives and ReactiveUI.Primitives.Reactive on net10.0-android and net11.0-android Validation: - dotnet build ReactiveUI.Primitives net10.0-android Release - dotnet build ReactiveUI.Primitives.Reactive net10.0-android Release - net11.0-android local validation is blocked by missing Android API level 37 on this machine; CI has the required SDK
|
Review coverage: - add focused TUnit coverage for Rx factory aliases, connectable aliases, SubscribeSafe, bounded Merge, SelectMany enumerable branches, event-pattern delegate variants, and Optional null semantics - raise local patch coverage for coverable runtime additions to 98.54% Runtime fixes: - keep async Signal.Create subscription cancellation lifetime valid after async setup completes - move Signal<T> dispatch helper into the static helper section to satisfy SST1204 without suppression API and build support: - ship Range, Interval, and Concat Rx alias API baselines for Primitives and Primitives.Reactive - add netfx AllowNullAttribute polyfill support for the updated Optional API
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?
Feature/API compatibility work for migrating Rx-first source bases.
What is the new behavior?
ReactiveUI.Primitives and ReactiveUI.Primitives.Reactive now expose the generally useful Rx-name operators needed by applications. This adds aliases and implementations for Publish/Replay/RefCount, SubscribeSafe, StartWith, timed Buffer, Finally, Throttle, Catch, SelectMany, and bounded enumerable Merge/Blend, with shipped PublicAPI baselines regenerated for both packages.
What is the current behavior?
Consumers migrating from System.Reactive source bases still need project-local compatibility helpers for several common Rx names, especially bounded enumerable Merge/Blend and selected multicast/time-based aliases.
Checklist
Additional information
Local validation completed: