Skip to content

fix(build): register interceptor namespaces through the InterceptorsNamespaces property - #104

Merged
glennawatson merged 1 commit into
mainfrom
fix/interceptors-namespaces-property
Sep 14, 2026
Merged

glennawatson merged 1 commit into
mainfrom
fix/interceptors-namespaces-property

Conversation

@glennawatson

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bug fix.

What is the new behavior?

The package registers its interceptor namespace through the InterceptorsNamespaces MSBuild property.

  • The compiler receives one InterceptorsNamespaces list holding the project's own namespaces, the generated ReactiveUI.Binding.Generated.Interceptors namespace, and the namespaces the SDK's own generators register.
  • Interceptor-based bindings work in the Rider Roslyn Worker as well as in Visual Studio and dotnet build.

What is the current behavior?

The package appends InterceptorsNamespaces=... to $(Features), which gives the compiler a second, conflicting entry.

  • The compiler keeps the last InterceptorsNamespaces entry, so the SDK's merged list is replaced and the configuration binder, request delegate and validation generator namespaces are dropped.
  • $(Features) is split on ;, so a project that lists its own interceptor namespaces keeps only the first one and loses ReactiveUI.Binding.Generated.Interceptors, and its bindings fall back to the dispatch overloads.
  • The Rider Roslyn Worker drops the parse options when Features repeats InterceptorsNamespaces (RIDER-142866).

Reported in #81 (comment).

What might this PR break?

None

Checklist

  • I have read the Contribute guide
  • 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

The only authored change is src/ReactiveUI.Binding.SourceGenerators/build/ReactiveUI.Binding.SourceGenerators.targets.

  • The Csc task has taken the InterceptorsNamespaces parameter since .NET SDK 9.0.100, and interception is only enabled from Roslyn 4.13.

…amespaces property

- Set InterceptorsNamespaces instead of appending a second InterceptorsNamespaces entry to Features.
- The compiler keeps only the last entry, so the Features form dropped the SDK generators namespaces and, when a project listed its own, the generated one.
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.73%. Comparing base (e6bc8aa) to head (b52a97c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #104   +/-   ##
=======================================
  Coverage   99.73%   99.73%           
=======================================
  Files         289      289           
  Lines       11533    11533           
  Branches     1259     1259           
=======================================
  Hits        11502    11502           
  Misses         18       18           
  Partials       13       13           

☔ 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

@glennawatson
glennawatson merged commit e200cb3 into main Sep 14, 2026
18 checks passed
@glennawatson
glennawatson deleted the fix/interceptors-namespaces-property branch September 14, 2026 22:58
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.

1 participant