Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ServiceInvoker treat Nullable<T> parameters as a match for null arguments #604

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

khellang
Copy link

@khellang khellang commented May 2, 2024

Background

When passing null to an async service method accepting a Nullable<T> parameter, the call fails as Halibut will not consider the method a match.

Results

Fixes #603

Before

Passing null to a service method with a Nullable<T> parameter failed. See #603

After

Invoking the method no longer fails.

Pre-requisites

  • I have read How we use GitHub Issues for help deciding when and where it's appropriate to make an issue.
  • I have considered informing or consulting the right people, according to the ownership map.
  • I have considered appropriate testing for my change.

@khellang khellang requested a review from a team as a code owner May 2, 2024 09:06
@CLAassistant
Copy link

CLAassistant commented May 2, 2024

CLA assistant check
All committers have signed the CLA.

@khellang khellang changed the title Add test showing exception when nullable parameter is called with nul… Make ServiceInvoker treat Nullable<T> parameters as a match for null arguments May 2, 2024
@khellang
Copy link
Author

Hello good folks! 👋 Any hint on when we can get this looked at? We've worked around it by splitting the RPC interface with different overloads with and without the nullable argument, but would really like a proper fix 😅

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.

Passing null for a Nullable<T> parameter fails with AmbiguousMatchException
2 participants