-
Notifications
You must be signed in to change notification settings - Fork 46
refactor: noop - dedup, cleanup, new type abstraction #130
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
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Refactors the Rust code generator internals to reduce duplicated feature-gated emission and move common naming/sanitization helpers into dedicated modules, with the intention of keeping generated output unchanged.
Changes:
- Introduces
FeatureConfighelper module to centralize feature gating (fmt_cfg/fmt_attr) logic. - Adds
utilsmodule withMessageExt/SignalExtnaming helpers and shared sanitization functions. - Refactors parts of
lib.rsto use new helpers and reduce duplicated code paths.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/lib.rs | Uses new FeatureConfig/utils helpers and refactors feature-gated codegen emission. |
| src/feature_config.rs | New module encapsulating feature gating / cfg emission helpers. |
| src/utils.rs | New module centralizing message/signal naming/sanitization utilities. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There are no changes to the generator output, just some minor refactoring to optimize the code structure, break giant lib.rs into a few more files, and de-duplicate feature-gated code gen.
There are no changes to the generator output, just some minor refactoring to optimize the code structure, break giant lib.rs into a few more files, and de-duplicate feature-gated code gen.
As part of the refactoring, there is now an enum representing signal's type - removing the need to deal with type strings.