Skip to content

Conversation

@nyurik
Copy link
Member

@nyurik nyurik commented Jan 23, 2026

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.

@codecov
Copy link

codecov bot commented Jan 23, 2026

Codecov Report

❌ Patch coverage is 83.42697% with 59 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/lib.rs 70.62% 3 Missing and 44 partials ⚠️
src/signal_type.rs 94.26% 6 Missing and 3 partials ⚠️
src/feature_config.rs 84.21% 1 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a 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 FeatureConfig helper module to centralize feature gating (fmt_cfg/fmt_attr) logic.
  • Adds utils module with MessageExt/SignalExt naming helpers and shared sanitization functions.
  • Refactors parts of lib.rs to 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.

@nyurik nyurik changed the title refactor: noop dedup and cleanup generation code refactor: noop - dedup, cleanup, new type abstraction Jan 24, 2026
@nyurik nyurik merged commit 04b5395 into oxibus:main Jan 25, 2026
7 checks passed
@nyurik nyurik deleted the clean-names branch January 25, 2026 22:49
@nyurik nyurik mentioned this pull request Jan 25, 2026
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.

3 participants