Skip to content

Fix source generated proxy suitability testing#1336

Merged
AArnott merged 2 commits intomainfrom
dev/andarno/fixes
Oct 25, 2025
Merged

Fix source generated proxy suitability testing#1336
AArnott merged 2 commits intomainfrom
dev/andarno/fixes

Conversation

@AArnott
Copy link
Copy Markdown
Member

@AArnott AArnott commented Oct 25, 2025

Fix issues that only show up when the interceptor is not used

This enables a bunch of tests that were previously not running when the interceptor is suppressed. Once we run them in that context, many of them were failing. I fix those bugs here.

This enables a bunch of tests that were previously not running when the interceptor is suppressed. Once we run them in that context, many of them were failing. I fix those bugs here.
@AArnott AArnott added this to the PolyType milestone Oct 25, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the testing of source-generated proxy suitability by correcting preprocessor directive placement and improving the logic for validating that proxies implement the correct set of interfaces.

  • Reorganized preprocessor directives in test file to properly exclude source-generated tests when interceptors are not available
  • Fixed interface validation logic to deduplicate required interfaces and properly check for assignability
  • Removed trailing period from error message for consistency

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
test/StreamJsonRpc.Tests/JsonRpcProxyGenerationTests.cs Corrected #if directive placement to properly scope the SourceGenerated test class when interceptors are unavailable
src/StreamJsonRpc/Reflection/ProxyInputs.cs Removed trailing period from Requirements property string
src/StreamJsonRpc/Reflection/ProxyBase.cs Enhanced proxy interface validation by deduplicating required interfaces and fixing the assignability check logic

Comment thread src/StreamJsonRpc/Reflection/ProxyBase.cs
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.

3 participants