-
-
Notifications
You must be signed in to change notification settings - Fork 15
feat(stackable-versioned): Add support for modules #891
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
This separates token generation code to be more modular. Depending on the context, individual parts of the code need to be placed in different locations. Two major refactors are the change of macro input as well as moving module generation out of the struct definition generation. This commit doesn't include changes for enum generation. This will be done in a separate commit.
This commit contains a major rework of most parts of the attribute macro to support attaching it to modules. Most of the previously existing features are already in place. There are only two missing features which will be added in follow-up commits: version specific doc comments and merged CRD YAML support. Because of that, some snapshot tests are failing.
This also adds a test to validate that the relevant code is not generated of the skip option is set.
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.
LGTM, left some comments and suggestions
crates/stackable-versioned-macros/src/codegen/container/enum.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com>
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.
LGTM
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.
🚀 LGTM
Part of stackabletech/issues#642
Add support to apply the
#[versioned()]
macro to modules to version all contained items at once. Adding this feature required extensive refactoring through out the code.