-
Notifications
You must be signed in to change notification settings - Fork 625
Description
I am...
- Reporting a bug
- Suggesting a new feature
- Requesting help with running my bot
- Requesting help writing plugins
- Here about something else
I am running...
- Errbot version: 6.1.1
- OS version: Tried on Windows and MacOS
- Python version: 3.6.8
- Using a virtual environment: N/A
Issue description
I have a situation where I have a total of 3 plugins:
- PluginA
- PluginB
- PluginC
Below are their plugin dependencies:
- PluginA depends on PluginB and PluginC
- PluginB depends on PluginC
I've roughly visualized the dependencies here:
Trying to run with this configuration results in an error:
2019-12-05 20:21:59,078 INFO errbot.core Error: PluginA failed to activate: Circular dependency in the set of plugins (PluginC, PluginA, PluginB).
PluginA fails to load, due to "circular dependencies". However, I do not see circular dependencies from what I described above.
So is this intentional; not allowing PluginA to depend on PluginC, since PluginB already depends on PluginC, and PluginA does depend on PluginB?
There aren't circular dependencies, since self depends on the same plugins as a child plugin depends on.
A workaround is to do something like this:
PluginA does not depend on PluginC
Then, from within PluginA do teh following:
self.get_plugin('PluginB').get_plugin('PluginC')Steps to reproduce
I've created a repo with the necessary code to reproduce this error here.
Simply run the test: pytest plugins_test.py.
Or run errbot itself, it is configured for text mode.
