Skip to content

fix: don't generate AnyEvent for eventless schemas - #467

Merged
rapids-bot[bot] merged 2 commits into
rapidsai:mainfrom
johanpel:any-event-empty
Jul 27, 2026
Merged

fix: don't generate AnyEvent for eventless schemas#467
rapids-bot[bot] merged 2 commits into
rapidsai:mainfrom
johanpel:any-event-empty

Conversation

@johanpel

Copy link
Copy Markdown
Contributor

Description

If a schema declares no events, don't generate an AnyEvent.

johanpel added 2 commits July 27, 2026 11:47
Signed-off-by: Johan Peltenburg <johan.peltenburg+code@gmail.com>
Signed-off-by: Johan Peltenburg <johan.peltenburg+code@gmail.com>
@johanpel johanpel changed the title Any event empty fix: don't generate AnyEvent for eventless schemas Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

generate_any_event now returns an empty token stream for schemas without entities, avoiding event-derive processing and enum generation. A unit test covers this behavior, and Options::any_event documentation describes the no-event case.

Changes

AnyEvent generation

Layer / File(s) Summary
Skip empty AnyEvent output
crates/instrumentation-build/src/any_event.rs, crates/instrumentation-build/src/lib.rs
Variant collection now precedes derive processing, empty variants return no tokens, a regression test verifies the result, and the option documentation describes this behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: dhruv9vats, mbrobbel

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately states the main change to skip AnyEvent generation for eventless schemas.
Description check ✅ Passed The description explains the change, but it omits related issues, testing, and screenshots sections from the template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]

This comment was marked as spam.

@johanpel

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit dace85b into rapidsai:main Jul 27, 2026
19 of 21 checks passed
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.

2 participants