Class WorkspaceGraph
java.lang.Object
network.ike.workspace.WorkspaceGraph
Graph operations over a workspace
Manifest.
All algorithms operate on the subproject dependency graph defined
by depends-on entries in workspace.yaml. The graph is small
(typically < 20 nodes) so simple implementations are preferred
over library dependencies.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCompute the propagation set: all subprojects that transitively depend on the given subproject (BFS on reverse edges).Detect dependency cycles.manifest()Return the underlying manifest.Topological sort of all subprojects.topologicalSort(Set<String> targetNames) Topological sort of the given subprojects (or all if none specified).verify()Verify manifest consistency.
-
Constructor Details
-
WorkspaceGraph
Build a graph from the given manifest.- Parameters:
manifest- parsed workspace manifest
-
-
Method Details
-
manifest
-
topologicalSort
Topological sort of the given subprojects (or all if none specified). Dependencies outside the target set are ignored.- Parameters:
targetNames- subprojects to include; empty means all- Returns:
- subprojects in dependency order (dependencies first)
- Throws:
ManifestException- if a cycle is detected
-
topologicalSort
-
cascade
Compute the propagation set: all subprojects that transitively depend on the given subproject (BFS on reverse edges).The result does NOT include the starting subproject itself.
- Parameters:
subprojectName- the changed subproject- Returns:
- subprojects affected by a change, in BFS discovery order
- Throws:
ManifestException- if the subproject does not exist
-
detectCycle
-
verify
-