Benjamin Schubert pushed to branch bschubert/rework-sort at BuildStream / buildstream
Commits:
-
ec60f2cd
by Benjamin Schubert at 2019-02-04T16:41:45Z
1 changed file:
Changes:
... | ... | @@ -441,8 +441,6 @@ class Loader(): |
441 | 441 |
meta_element = element._loader._collect_element(element)
|
442 | 442 |
element.visit(meta_element)
|
443 | 443 |
|
444 |
- visited_elements = []
|
|
445 |
- |
|
446 | 444 |
for dep in sorted(element.dependencies, key=cmp_to_key(compare_unprocessed), reverse=True):
|
447 | 445 |
if dep.dep_type != Symbol.RUNTIME:
|
448 | 446 |
dep.element.on_visit(meta_element.build_dependencies.append)
|
... | ... | @@ -454,9 +452,7 @@ class Loader(): |
454 | 452 |
# it as soon as possible
|
455 | 453 |
elements_to_load.append(dep.element)
|
456 | 454 |
else:
|
457 |
- visited_elements.append(dep.element)
|
|
458 |
- |
|
459 |
- elements_to_load.extendleft(visited_elements)
|
|
455 |
+ elements_to_load.appendleft(dep.element)
|
|
460 | 456 |
|
461 | 457 |
for element in self._meta_elements.values():
|
462 | 458 |
element.build_dependencies.sort(key=attrgetter("index"), reverse=True)
|