Skip to content

Commit 8fe2d3d

Browse files
authored
Update get_build_order.py
1 parent 798e29d commit 8fe2d3d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.ci/get_build_order.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,7 @@ def topological_sort(packages):
9797
raise ValueError(f"Cyclic dependency detected: {' -> '.join(cycle)}")
9898

9999
# Initialize queue with packages having no dependencies
100-
queue = deque([pkg for pkg in all_packages if indegree[pkg] == 0 and graph[pkg]])
101-
102-
for package in [pkg for pkg in all_packages if indegree[pkg] == 0 and not graph[pkg]]:
103-
queue.append(package)
100+
queue = deque([pkg for pkg in all_packages if indegree[pkg] == 0 and graph[pkg]]
104101

105102
build_order = []
106103

@@ -113,6 +110,9 @@ def topological_sort(packages):
113110
if indegree[dependent] == 0:
114111
queue.append(dependent)
115112

113+
for package in [pkg for pkg in all_packages if indegree[pkg] == 0 and not graph[pkg]]:
114+
build_order.append(package)
115+
116116
for idx_large in range(0, len(build_order)-2):
117117
for idx_small in range(0, len(build_order)-idx_large-1):
118118

0 commit comments

Comments
 (0)