Skip to content

breaking: drop netstandard2.0, seal ValidationHelper, migrate to TUnit, modernize build#876

Merged
glennawatson merged 6 commits intomainfrom
tunit-migration
Feb 28, 2026
Merged

breaking: drop netstandard2.0, seal ValidationHelper, migrate to TUnit, modernize build#876
glennawatson merged 6 commits intomainfrom
tunit-migration

Conversation

@glennawatson
Copy link
Copy Markdown
Collaborator

@glennawatson glennawatson commented Feb 28, 2026

Breaking Changes

  • netstandard2.0 removed - aligning with the ReactiveUI upstream dependency which no longer targets netstandard2.0. Consumers on netstandard2.0 should migrate to a .NET Framework (net462/net472/net481) or .NET (net8.0/net9.0/net10.0) target.
  • net481 added to .NET Framework targets (net462, net472, net481).
  • ValidationHelper sealed - no meaningful subclass scenarios exist; simplifies dispose pattern.
  • Version bumped to 7.0 for the breaking changes above.

Supported Target Frameworks

Category Targets
.NET net8.0, net9.0, net10.0
.NET Framework net462, net472, net481
Windows net8.0-windows10.0.19041.0, net9.0-windows10.0.19041.0, net10.0-windows10.0.19041.0
Android net9.0-android, net10.0-android

Test Coverage

Metric Coverage
Line 99.3%
Branch 98.3%
Method 100%

Remaining uncovered lines are in legitimately reachable but hard-to-trigger paths (view property setter exceptions, chained property expressions). Provably unreachable defensive code was removed rather than left as dead code.

Maintainer Notes

  • Test framework migrated from xUnit to TUnit with Microsoft Testing Platform (MTP).
  • Microsoft.Testing.Extensions.CodeCoverage pinned at 18.4.1 - newer versions have a regression that produces incorrect coverage data. Do not upgrade without verifying coverage output.
  • SLNX solution format replaces the legacy .sln file (ReactiveUI.Validation.slnx). Samples now contained in the main slnx file and moved from /samples.
  • Central Package Management adopted via Directory.Packages.props - all package versions are managed centrally.
  • API approval tests use Verify.TUnit - run tests to regenerate .verified.txt files when the public API surface changes.
  • Release workflow updated to use workflow_dispatch, eSigner code signing, and OIDC NuGet trusted publishing (aligned with Splat/ReactiveUI).

Other Changes

  • Samples and tests relocated under src/ for unified build
  • Verbose null-check blocks replaced with ArgumentExceptionHelper using CallerArgumentExpression
  • Manual backing fields replaced with C# field keyword for auto-properties
  • Internal classes sealed (SingleValidationText, ArrayValidationText, ReadOnlyDisposableCollection<T>)
  • Removed provably unreachable defensive code in BasePropertyValidation
  • Added Polyfill package for downlevel framework support
  • Added codecov.yml configuration
  • Added CLAUDE.md with build, test, and architecture reference
  • Updated README badges and removed deprecated Xamarin.Android package references

… build infrastructure

- Remove netstandard2.0 target aligning with ReactiveUI upstream dependency
- Migrate test framework from xUnit to TUnit with Microsoft Testing Platform
- Adopt SLNX solution format and Central Package Management
- Add net481 to .NET Framework targets
- Update NuGet dependencies to latest (Microsoft.Testing.Extensions.CodeCoverage pinned at 18.4.1 due to code coverage regression)
- Relocate samples and tests under src/ for unified build
- Replace verbose null-check blocks with ArgumentExceptionHelper using CallerArgumentExpression
- Use C# field keyword for auto-properties replacing manual backing fields
- Seal internal classes and remove provably unreachable defensive code
- Add Polyfill package for downlevel framework support
- Achieve 99.2% line coverage, 98.1% branch coverage, 100% method coverage
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 28, 2026

Codecov Report

❌ Patch coverage is 98.61111% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 99.38%. Comparing base (e561ef1) to head (5804488).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...eUI.Validation/Helpers/ReactiveValidationObject.cs 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #876       +/-   ##
===========================================
+ Coverage   71.65%   99.38%   +27.73%     
===========================================
  Files          21       21               
  Lines         709      650       -59     
  Branches      151      107       -44     
===========================================
+ Hits          508      646      +138     
+ Misses        119        0      -119     
+ Partials       82        4       -78     

☔ View full report in Codecov by Sentry.
📢 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.

- Bump version to 7.0 for breaking netstandard2.0 removal
- Align release workflow with Splat/ReactiveUI (workflow_dispatch, eSigner, OIDC NuGet publishing, auto GitHub release)
- Remove build-samples workflow (samples now build via main SLNX)
- Remove redundant configuration from ci-build workflow
- Update README badges to link to CI workflow and add license/stars/good-first-issue
- Add supported platforms table to README
- Remove deprecated Xamarin.Android support package references from README
…n path

- Seal ValidationHelper (no meaningful subclass scenarios exist)
- Simplify ValidationHelper.Dispose now that virtual dispatch is unnecessary
- Add test covering ExpressionExtensions.GetPropertyPath with static member expressions
- Update API approval verified files
@glennawatson glennawatson changed the title breaking: drop netstandard2.0, migrate to TUnit, modernize build breaking: drop netstandard2.0, seal ValidationHelper, migrate to TUnit, modernize build Feb 28, 2026
@glennawatson glennawatson merged commit cd78774 into main Feb 28, 2026
6 checks passed
@glennawatson glennawatson deleted the tunit-migration branch February 28, 2026 08:49
@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant