-
Notifications
You must be signed in to change notification settings - Fork 425
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
Command aliases on Mixin not being applied #1836
Comments
Yes looks like aliases are not picked up from mixins. I see this in the code for public CommandSpec addMixin(String name, CommandSpec mixin) {
mixins.put(interpolator.interpolate(name), mixin);
initName(interpolator.interpolateCommandName(mixin.name()));
// TODO initAliases(mixin.aliases()); // should we? We can change this. Will you be able to provide a unit test? |
I'll look into providing a PR with fix and unit test either myself or by my colleague. Interestingly, the Most of our commands now look as follows, with @Command(name = MyOutputHelperMixins.List.CMD_NAME)
public class SomeListCommand extends AbstractOutputCommand implements IBaseHttpRequestSupplier {
@Getter @Mixin private MyOutputHelperMixins.List outputHelper;
...
} If we could specify the command name on the @Command(name = MyOutputHelperMixins.Get.CMD_NAME)
public class SomeListCommand extends AbstractOutputCommand implements IBaseHttpRequestSupplier {
@Getter @Mixin private MyOutputHelperMixins.List outputHelper;
...
} Any suggestions on how to allow the command name to be specified through a |
Our discussions in #1665 and #1799 seem to suggest that it should be possible to define command aliases through a Mixin, i.e. something like the following:
However, for some reason the aliases are not being applied to
MyListCommand
. Any idea why?The text was updated successfully, but these errors were encountered: