You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Package/ModuleGraph] Allow cyclic package dependencies if they don't introduce a cycle in a build graph (swiftlang#7530)
### Motivation:
It should be possible for packages to depend on each other if such
dependence doesn't introduce cycles in the build graph.
### Modifications:
- Introduced a new DFS method to walk over graphs that breaks cycles.
- Replaces use of `findCycle` + `topologicalSort` with `DFS` while
building manifest and package graphs. This allows cycles in dependencies
to be modeled correctly.
- Removes some of the redundant data transformations from modules graph.
- Modifies `ResolvedPackage` to carry identities of its dependencies
instead of resolved dependencies themselves. This helps to simplify
logic in `createResolvedPackages`.
- Adds detection of target cycles across packages.
### Result:
Makes it possible for package A to depend on package B and B to depend
on A if their targets don't form a cycle.
0 commit comments