Ver a proveniência

main module of a plugin just has to export init/1

pull/311/head
Tristan Sloughter há 10 anos
ascendente
cometimento
9eca4b50c5
1 ficheiros alterados com 3 adições e 6 eliminações
  1. +3
    -6
      src/rebar_plugins.erl

+ 3
- 6
src/rebar_plugins.erl Ver ficheiro

@ -61,13 +61,10 @@ validate_plugin(Plugin) ->
{ok, Providers} ->
{true, Providers};
undefined ->
Exports = sets:from_list(Plugin:module_info(exports)),
Required = sets:from_list([{init,1},
{do,1},
{format_error,1}]),
case sets:is_subset(Required, Exports) of
Exports = Plugin:module_info(exports),
case lists:member({init,1}, Exports) of
false ->
?WARN("Plugin ~p is not a provider. It will not be used.~n", [Plugin]),
?WARN("Plugin ~p does not export init/1. It will not be used.~n", [Plugin]),
false;
true ->
{true, Plugin}

Carregando…
Cancelar
Guardar