Skip to content

fix: support qualified types in topic handlers#344

Open
immanuwell wants to merge 1 commit into
dapr:mainfrom
immanuwell:fix/topic-qualified-types
Open

fix: support qualified types in topic handlers#344
immanuwell wants to merge 1 commit into
dapr:mainfrom
immanuwell:fix/topic-qualified-types

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

Description

#[topic] blows up if the handler arg uses a qualified type like serde_json::Value.

The macro was splitting tokens on : so serde_json::Value got treated like 2 inputs. This switches it to parse the function signature with syn, keeps the String fast path, and adds regression tests. tiny fix, but pretty real.

Repro:

#[topic(pub_sub_name = "pubsub", topic = "A")]
async fn handle_a_event(order: serde_json::Value) {}

Before:
cargo check panics with Expected to only have one input variable

After:
cargo check passes.

Issue reference

This PR will close #172

Checklist

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Signed-off-by: immanuwell <pchpr.00@list.ru>
@immanuwell immanuwell requested review from a team as code owners June 20, 2026 08:15
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: Pubsub function parameter does not allow additional colons

1 participant