Skip to content

fix(primitives-core): ship Optional public API updates#61

Merged
ChrisPulman merged 4 commits into
mainfrom
CP_optional-public-api-baselines
Jun 19, 2026
Merged

fix(primitives-core): ship Optional public API updates#61
ChrisPulman merged 4 commits into
mainfrom
CP_optional-public-api-baselines

Conversation

@ChrisPulman

@ChrisPulman ChrisPulman commented Jun 19, 2026

Copy link
Copy Markdown
Member

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 nullable ToString() override represented in the shipped PublicAPI baselines for every ReactiveUI.Primitives.Core target 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

  • 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

Local validation completed:

  • ./tools/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=

The default local solution build still requires Android API 37 to be installed in the local Android SDK for net11.0-android TFMs.

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=.
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.13%. Comparing base (1276690) to head (8dc8057).

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.
📢 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.

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/*'
@sonarqubecloud

Copy link
Copy Markdown

@ChrisPulman ChrisPulman merged commit f5cc442 into main Jun 19, 2026
14 checks passed
@ChrisPulman ChrisPulman deleted the CP_optional-public-api-baselines branch June 19, 2026 11:30
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.

2 participants