Fix group cyclic interactions

Skip adding an edge between a pair of plugins if all the following
conditions are met:
- the edge is to be added due to group membership
- adding the edge would introduce a cycle in the absence of any
  other group membership edges.
This commit is contained in:
Oliver Hamlet
2018-03-19 17:27:56 +00:00
parent a178bf3adb
commit f8fbe2984f
8 changed files with 134 additions and 17 deletions
+7 -1
View File
@@ -26,7 +26,7 @@ Create plugin graph vertices
Once loaded, a directed graph is created and the plugins are added to it in
lexicographical order as vertices. Any metadata a plugin has in the masterlist
and userlist are then merged into its vertex's data store. Plugin group
dependencies are also resolved and added as additional load after plugins.
dependencies are also resolved and added as group-derived plugins.
Create plugin graph edges
==============================
@@ -46,6 +46,12 @@ For each plugin:
4. Add edges coming from all the plugin's load after files that are installed
plugins.
Group-derived interdependencies are then evaluated. Each plugin's group-derived
plugins are iterated over and individually checked to see if adding an edge from
the group-derived plugin to the plugin would cause a cycle, and if not the edge
is recorded. Once all potential edges have been checked, the recorded edges are
added to the graph.
At this point, all explicit interdependencies have been graphed. Plugin priority
metadata values must now be propagated down the dependency trees to ensure that
priority edges are added correctly later in the process. To do this: