Skip to content

fix: raise unsafe property changes across assemblies - #177

Open
ChrisPulman wants to merge 2 commits into
mainfrom
CP_fix-to-property-unsafe-split-assemblies
Open

ChrisPulman wants to merge 2 commits into
mainfrom
CP_fix-to-property-unsafe-split-assemblies

Conversation

@ChrisPulman

Copy link
Copy Markdown
Member

Summary

ToPropertyUnsafe now raises notifications when ReactiveUI's interface and extension methods live in separate assemblies.

  • Resolve notification extensions from the object's owning assembly and base classes for both ReactiveUI flavours, preserving the legacy interface-assembly fallback.
  • Add regression coverage for split assemblies, inherited models, notification ordering, and fallback raise methods, and extend the ReactiveUI verification example with an unsafe property.
  • Update the existing RoslynCommonAnalyzers packages to 5.1.3 through central package management.

Why

ReactiveUI 26.0.1 defines IReactiveObject in ReactiveUI.Core and its notification extensions in ReactiveUI or ReactiveUI.Reactive. Looking only in the interface assembly causes ToPropertyUnsafe to fail for a ReactiveObject view model.

Closes #176.

Breaking changes

None.

How this was verified

Regression tests cover both runtime flavours, separate interface/extension assemblies, consumer subclasses, legacy layouts, optional before-change notifications, and void or returning raise methods. Exercised the full solution build and TUnit suite, all configured ToProperty verification targets, documentation examples, and Windows platform/threading examples; the modified runtime file has complete line and branch coverage.

Native AOT compilation reached native linking, which could not complete because this host lacks Windows SDK libraries (advapi32.lib). Linux and Apple execution were unavailable on this Windows host.

Notes for the reviewer

Start with the notification extension lookup: the owner's inheritance chain identifies the ReactiveUI flavour that holds notification state. The tests create separate assemblies without adding dependencies; the analyser version update is in a separate commit. The sibling ReactiveUI solution and other unsafe APIs did not need changes.

Checklist

  • I have read the Contribute guide
  • The PR title follows Conventional Commits
  • Tests cover this change, or the summary says why they do not
  • New or changed public API has XML documentation

- Resolve ReactiveUI notification extensions from the owner and base assemblies.
- Support both runtime flavours and retain the legacy interface assembly fallback.
- Cover split assemblies, notification ordering, and fallback raise methods.
- Exercise ToPropertyUnsafe with ReactiveUI in the verification example.

Closes #176
- Update the central RoslynCommonAnalyzers version for existing analyzer packages.
@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.32%. Comparing base (c79c70c) to head (791a77a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #177      +/-   ##
==========================================
+ Coverage   99.28%   99.32%   +0.04%     
==========================================
  Files         403      403              
  Lines       15033    15041       +8     
  Branches     2229     2232       +3     
==========================================
+ Hits        14925    14940      +15     
+ Misses        108      101       -7     

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

@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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] ToPropertyUnsafe (and Possibly Other Unsafe Methods) Always Fails

1 participant