Open Wanimatrix opened 1 year ago
I've submitted #343 to address this, but I think that it will respect the --disable-built-in-plugins
option by simply returning the same Dispatcher instance after it is first instantiated.
As a side effect, #343 introduces a cached Dispatcher instance that plugins can begin leveraging -- they can simply access dotbot.dispatcher.current_dispatcher
directly instead of re-instantiating the Dispatcher class.
When any plugin is using the dispatcher for nested actions it should pass all plugins again to avoid that any plugin as subtask would be handled. Currently this means a lot of plugins are broken because they don't pass plugins to the dispatcher.
To fix this, take all Plugin subclasses when no plugin is given (we should at least have the default plugins).