-
Notifications
You must be signed in to change notification settings - Fork 704
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
@Option decorators not working for custom plugins #1165
Comments
I guess this counts as a request to use |
+1 for making it available externally. When I was authoring my plugin, I referred to the built-in plugins as examples. |
Fixed in 0.16.2 :) |
@Gerrit0, this isn't working as aspected (or at least as thought it would)
The output for the following command is still incorrect: npm install
npm run example Expected from branch
Actual (has declaration false):
My current work-around is to call the following from within the plugin:
I think I expected the decorated option for each plugin to be added as the component is loaded instead of after all the plugins have been loaded. That way, the plugin can make use of the options after the component is added. |
Hmm that's a bit trickier. The decorator no longer requires being attached to a component. It just requires a reference to the options (or an application) when run... this was a preemptive step as a part of a long term effort to remove the Declaring options when the component is loaded poses another problem, what happens if/when the component is removed? This is how it worked before the refactor, and if any option declared under CliApplication was used when not running from the Cli it would break with an unhelpful error. I guess makes sense to expose |
Would it be feasible to scope options to a component? I notice that there's already the concept of scoping with |
Even |
This sounds ideal. What do you want me to do with this issue? I'm currently use the work-around I mentioned previously so I'm not really waiting for this to be resolved. |
Let's just use this issue to track the rename to |
Expected Behavior
Plugins using
@Option
decorator should have their options registered like they used to in version0.15.8
.Actual Behavior
@Option
s aren't registered.Steps to reproduce the bug
Environment
The text was updated successfully, but these errors were encountered: