-
-
Notifications
You must be signed in to change notification settings - Fork 94
Added source generator for context conversion to avoid reflections #435
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
Merged
Conversation
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
Test Results 30 files 30 suites 1h 1m 31s ⏱️ Results for commit c4710b1. ♻️ This comment has been updated with latest results. |
Deploying eventuous-main with
|
| Latest commit: |
aea6c22
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bb4261a7.eventuous-main.pages.dev |
| Branch Preview URL: | https://source-generator-for-context.eventuous-main.pages.dev |
…version' into source-generator-for-context-conversion
nmummau
pushed a commit
to nmummau/eventuous
that referenced
this pull request
Oct 11, 2025
…ventuous#435) * Added source generator for context conversion to avoid reflections * Add a warning when reflections fallback is used * Migrate to slnx
nmummau
pushed a commit
to nmummau/eventuous
that referenced
this pull request
Oct 23, 2025
…ventuous#435) * Added source generator for context conversion to avoid reflections * Add a warning when reflections fallback is used * Migrate to slnx
nmummau
pushed a commit
to nmummau/eventuous
that referenced
this pull request
Oct 24, 2025
…ventuous#435) * Added source generator for context conversion to avoid reflections * Add a warning when reflections fallback is used * Migrate to slnx
nmummau
pushed a commit
to nmummau/eventuous
that referenced
this pull request
Oct 24, 2025
…ventuous#435) * Added source generator for context conversion to avoid reflections * Add a warning when reflections fallback is used * Migrate to slnx
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.
The
MessageConsumeContextConverterclass uses compiled expressions that are created at runtime (and cached) to convertIMessageConsumeContexttoIMessageConsumeContext<T>for downstream processing in typed handlers such as projections. Although it's quite fast, this PR improves it further by generating conversion code so there's no need to use reflections.Right now, it's only tested with sample and test projects, so some variations of syntax trees might be not handled. Therefore, the fallback is to use the reflection-based method if there's no static conversion registered. The converter will log a warning, asking to open a GitHub issue to improve the generator.