-
Notifications
You must be signed in to change notification settings - Fork 12
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
Implement a PayloadRegister
as a factory to register and create Payload
s
#68
Conversation
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
PayloadRegister
as a factory to register and create Payload
sPayloadRegister
as a factory to register and create Payload
s
qssc::payload::registry::PayloadRegistry::registeredPlugins()) { | ||
os << target.second.getName() << " - " << target.second.getDescription() | ||
<< "\n"; | ||
} |
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.
I'm listing here the available payloads, although there is no CLI argument to select one or another (currently there is only one: ZIP). If we agree on the argument name, I can add it to this PR, or we can wait until we have more payloads registered and there is an actual use case for this argument.
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.
I suggest adding the argument to this PR, for completeness. We have a similar arg for listing targets:
[$] ./bin/qss-compiler --show-targets
Registered Targets:
--mock - Mock system for testing the targetting infrastructure.
show-payloads
seems appropriate. (Feel free also to correct the spelling of 'targeting'. :)
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, 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.
Approving from my side.
Pinging @mhillenbrand one more, and @mbhealy time to take a look.
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.
This PR is a great improvement! I find it already in very good shape - a few comments from a first look below.
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
Friendly reminder, @mhillenbrand @mbhealy |
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.
This looks mostly good to me, with a few small nits & suggestions.
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.
Just one nit
For some reason GitHub is not allowing me to add my one comment to the file: |
1 similar comment
For some reason GitHub is not allowing me to add my one comment to the file: |
Co-authored-by: Marius Hillenbrand <marius.hillenbrand@ibm.com>
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, 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.
This PR implements a
PayloadRegistry
factory as a template specialization ofplugin::registry::PluginRegistry<T>
(see #63). This registry can instantiatePayloadInfo
items which, in turn, are responsible of instantiate concretePayload
implementations (same schema asTargetSystem
).It also turns the
ZipPayload
into a pluggablePayload
for this new registry.