-
Notifications
You must be signed in to change notification settings - Fork 111
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
RSDK-9726 - improve modulegen help text and deprecate resource-type flag #4711
RSDK-9726 - improve modulegen help text and deprecate resource-type flag #4711
Conversation
// make sure we support subtypes that are passed with different spacers (e.g., | ||
// "power sensor", "power-sensor", "power_sensor", "powerSensor") |
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.
a bit of flyby logic here. previously, the CLI would complain if we passed power-sensor
but not power_sensor
. Changes here enable us to be more case-agnostic for multi-word resource subtypes.
cc @ale7714 |
Probably gonna hold off on merging this until #4692 is in, as that feature changes some formatting stuff and I want to ensure consistency. cc @purplenicole730 |
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.
looks great! and thank you for thinking about resource type/subtype a little bit more in depth, it's good to be aware of this
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.
Could you also update the module generation workflow?
Sure! Maybe dumb question, but what do you want to see updated? it seems to me that we want to keep the workflow basically the same except stop asking for unnecessary information, which I think this PR achieves? |
I'm pretty sure the workflow still uses the flag you're trying to stop using, so I think it'd be good to also follow that there! |
@purplenicole730 I think we should be good on that! It isn't visible as a flag (though it's still supported of course for backwards compatibility), and the |
Oh though actually there was an issue where we were listing |
Possibly I'm misunderstanding but just to clarify: at no point are we using the flag at this point. You can confirm this by the removal of |
Just spoke offline, @purplenicole730 clarified that it was the CI workflow that needed updating :) which is now done! |
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.
woo!
3bb7874
to
5257803
Compare
Provides improved help text in terms of the
usage
invocation, as well as clarifying the role/usage of thelanguage
,model-name
,name
,public-namespace
, andresource-subtype
flags.Additionally, removes
resource-type
as a flag we pay attention to/care about. While still supported for backwards compatibility, it is invisible and ignored. This flag is a gotcha since each subtype only has one valid type (except generic, but we can carve out a specific case for that), and a user shouldn't reasonably be expected to understand the component/service distinction that is primarily internal.Tested by creating modules using both old and new code and diffing them to ensure no changes in behavior.
Old help text:
New help text: