fix(primitives-core): ship Optional public API updates#61
Merged
Conversation
Add the Optional<T> conversion helpers and nullable ToString override to the Core public surface. Regenerate ReactiveUI.Primitives.Core shipped PublicAPI baselines for net8.0, net9.0, net10.0, net11.0, net462, net472, net48, and net481. Validation: generate-publicapi.ps1 -Filter ReactiveUI.Primitives.Core -Jobs 1; dotnet restore ReactiveUI.Primitives.slnx; dotnet build ReactiveUI.Primitives.Core/ReactiveUI.Primitives.Core.csproj --no-restore; dotnet build ReactiveUI.Primitives.slnx --no-restore -p:AndroidPrimitivesTargetFrameworks=.
glennawatson
approved these changes
Jun 19, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61 +/- ##
==========================================
+ Coverage 93.10% 93.13% +0.03%
==========================================
Files 459 459
Lines 16379 16387 +8
Branches 2041 2043 +2
==========================================
+ Hits 15249 15262 +13
+ Misses 888 885 -3
+ Partials 242 240 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add TUnit coverage for Optional<T> conversion helpers, implicit and explicit operators, and ToString formatting for value and none states. This addresses Codecov patch coverage failures on PR #61 after the public API updates. Validation: dotnet test tests/ReactiveUI.Primitives.Tests/ReactiveUI.Primitives.Tests.csproj via Microsoft Testing Platform/TUnit across net8.0, net9.0, net10.0, and net11.0.
Add TUnit coverage for Result success and failure status, exception preservation, null validation, and string formatting. This raises project coverage after Codecov patch coverage was fixed for the Optional<T> public API update. Validation: dotnet test tests/ReactiveUI.Primitives.Tests/ReactiveUI.Primitives.Tests.csproj -- --treenode-filter '/*/*/ResultTests/*'; focused MTP coverage confirms Result.cs has no missed lines.
Tests: - Add a focused StateSignal<T> contract test for observer-state reporting, TryGetValue, terminal error replay, and disposal state. Coverage: - Covers existing ReactiveUI.Primitives.Core StateSignal<T> public lines that remained missed in optimized coverage. Validation: - dotnet test tests/ReactiveUI.Primitives.Tests/ReactiveUI.Primitives.Tests.csproj -- --treenode-filter '/*/*/StateSignalTests/*' - dotnet test tests/ReactiveUI.Primitives.Tests/ReactiveUI.Primitives.Tests.csproj -f net8.0 -c Release --no-restore -- --coverage --treenode-filter '/*/*/StateSignalTests/*'
|
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?
Fix / public API baseline update for
ReactiveUI.Primitives.Core.What is the new behavior?
Optional<T>now has its newly added conversion helpers and nullableToString()override represented in the shipped PublicAPI baselines for everyReactiveUI.Primitives.Coretarget framework.The Core project analyzer ordering issue is also resolved by keeping the new static operators/helpers before the instance
ToString()member.What is the current behavior?
The generated public API baselines were missing the new
Optional<T>surface, and the full Core build failed analyzer ordering rules for the newly added members.Checklist
Additional information
Local validation completed:
./tools/generate-publicapi.ps1 -Filter ReactiveUI.Primitives.Core -Jobs 1dotnet restore ReactiveUI.Primitives.slnxdotnet build ReactiveUI.Primitives.Core/ReactiveUI.Primitives.Core.csproj --no-restoredotnet build ReactiveUI.Primitives.slnx --no-restore -p:AndroidPrimitivesTargetFrameworks=The default local solution build still requires Android API 37 to be installed in the local Android SDK for
net11.0-androidTFMs.