Closed tothlac closed 6 years ago
Might be worth to note that the following fails as well (on latest master):
{alias, [{myalias, [{plugins, "list"}]}]}.
So, what would be a correct alias config for rebar3 do plugins lists
for example? It might be a bug in how alias arguments are parsed.
I think that the current alias provider does not support namespaced commands. Support needs to be added for that, probably under the format {alias, [{myalias, [{{plugins, list}, ""}]}]}.
or something
It looks like it is actually the same error: rebar3 plugins list
uses the plugins
namespace and the command is list.
Currently the following two clauses are supported:
Cmd :: atom()
{Cmd :: atom(), Args :: string()}
The following two cases should be supported:
{Namespace :: atom(), Cmd :: atom()}
{Namespace :: atom(), Cmd :: atom(), Args :: string()}
Would this format be also fine for you?
yeah I think that would make sense as well.
It looks like this small modification does the trick: https://github.com/tothlac/rebar3/commit/22ee27d99bb16ccf58e1080f89795135ad18cf9c
I have a plugin, which has several modules using different names.
For example appup plugin implements clean, compile, generate, and so on.
In the implementation of the plugin command modules, the namespace is always the same (appup), but the name is different (clean, compile, generate).
My problem is that I would like use them in aliases, like:
This is the only way I’ve found to call the ‘appup clean’ command.
Calling it rebar3 complains:
I know the name passed from rebar_prv_alias to rebar_prv_do:do_tasks/2 should be clean, and the namespace defined in the state, should should be ‘appup’.
Unfortunately rebar_prv_alias passes default namespace in rebar_state to rebar_prv_do:do_tasks/2. Is there any solution for this?
So basically the question is that how can I call
rebar3 appup clean
from an alias, or any module:do function which implemented not in the default namespace.