fix(primitives): separate R3 bridge generator package#114
Merged
Conversation
Package changes: - Package ReactiveUI.Primitives.R3Bridge.Generator as a standalone analyzer NuGet package. - Remove the R3 bridge generator analyzer from the runtime ReactiveUI.Primitives and ReactiveUI.Primitives.Async packages. Generator changes: - Replace the generated internal marker attribute with an AssemblyMetadata attribute stamped by the generator. - Keep R3 and R3Async bridge emission conditional on the consuming compilation referencing the required external symbols. Tests and docs: - Update generator tests to verify no CS0436 warning path through project references and InternalsVisibleTo. - Update README and packaged Skill guidance for the standalone generator package.
glennawatson
approved these changes
Jul 2, 2026
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #114 +/- ##
==========================================
- Coverage 91.35% 91.33% -0.02%
==========================================
Files 658 658
Lines 20564 20564
Branches 2481 2481
==========================================
- Hits 18787 18783 -4
- Misses 1441 1443 +2
- Partials 336 338 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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?
A packaging and source-generator fix for the R3/R3Async bridge generator.
What is the new behavior?
ReactiveUI.Primitives.R3Bridge.Generatoris packaged as a standalone analyzer package. The runtimeReactiveUI.PrimitivesandReactiveUI.Primitives.Asyncpackages no longer embed the generator or depend on it.The generator now stamps consuming assemblies with
AssemblyMetadata("ReactiveUI.Primitives.R3Bridge.Generator", "0.1.0")instead of generating a custom internal marker attribute. This keeps the generated bridge behavior unchanged while avoiding duplicate generated marker types across project-reference andInternalsVisibleTobuilds.README and packaged Skill guidance now describe the standalone generator package and opt-in install flow.
What is the current behavior?
The R3 bridge generator was embedded into runtime packages as an analyzer, and it generated an internal marker attribute type into each consuming compilation. That shape could participate in CS0436-style duplicate type warnings when project references and internals visibility expose generated output across compilations.
Checklist
Additional information
Validation performed locally:
dotnet build "ReactiveUI.Primitives.R3Bridge.Generator\ReactiveUI.Primitives.R3Bridge.Generator.csproj" -c Releasedotnet pack "ReactiveUI.Primitives.R3Bridge.Generator\ReactiveUI.Primitives.R3Bridge.Generator.csproj" -c Release --no-builddotnet test "tests\ReactiveUI.Primitives.Tests\ReactiveUI.Primitives.Tests.csproj" -f net8.0 -- --treenode-filter "/*/*/R3BridgeGeneratorTests/*" --output Detaileddotnet test "tests\ReactiveUI.Primitives.Async.Tests\ReactiveUI.Primitives.Async.Tests.csproj" -f net8.0 -- --treenode-filter "/*/*/AsyncBridgeGeneratorContractTests/*" --output DetailedR3BridgeGenerator.csandR3AsyncBridgeGenerator.csreported no missed coverage.dotnet build "ReactiveUI.Primitives.slnx" -c Releasedotnet test "ReactiveUI.Primitives.slnx" -c Release --no-build -- --output Detailedpassed 10,500 tests.ReactiveUI.PrimitivesandReactiveUI.Primitives.Asyncno longer include R3 bridge analyzer assets.git diff --checkis clean apart from Git line-ending warnings on Windows.codecov.ymlis intentionally unchanged. CodeQL is excluded from the requested green-build target.