-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feature Request: Automatically Pass Globals to Variant Modules #29
Comments
@mumoshu wrote (in slack):
I am okay if there's a way to be more explicit about when the overwriting/inheritance takes place Maybe something like this:
Unless @mumoshu wrote:
I think modules must define options/parameters explicitly. @mumoshu wrote:
Exactly. |
Imported variant command's globals (top-level parameters and options) are now merged into the command, when it misses parameters and options with the same names. If any imported global's type conflict with the command's corresponding parameter/option type, it fails early so that the imported command doesn't fail due to unexpected value/type provided. Resolves #29
Imported variant command's globals (top-level parameters and options) are now merged into the command, when it misses parameters and options with the same names. If any imported global's type conflict with the command's corresponding parameter/option type, it fails early so that the imported command doesn't fail due to unexpected value/type provided. Resolves #29
Imported variant command's globals (top-level parameters and options) are now merged into the command, when it misses parameters and options with the same names. If any imported global's type conflict with the command's corresponding parameter/option type, it fails early so that the imported command doesn't fail due to unexpected value/type provided. Resolves #29
what
example
Our root module has something like this:
Then in the root module we define a bunch of global options
Then in one of our imported modules will have something like: (note the defaults are different)
We want the root global defaults to override the module defaults. Meaning that if
--config-dir
is not passed on the command line, then the default value of the option in the root module, should override the default value of the imported module. If the imported module does not declare the option/parameter, then it's just skipped. So only modules that explicitly define the parameter will inherit the default value from the root module.why
s
)The text was updated successfully, but these errors were encountered: