Skip to content

Commit d156861

Browse files
committed
Print all commands during circular deps error.
1 parent ee277fc commit d156861

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/sw/core/build.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,14 @@ std::unique_ptr<ExecutionPlan> SwBuild::getExecutionPlan(const Commands &cmds) c
11221122
ep->printGraph(ep->getGraph(), cyclic_path / "processed", ep->getCommands(), true);
11231123
ep->printGraph(ep->getGraphUnprocessed(), cyclic_path / "unprocessed", ep->getUnprocessedCommands(), true);
11241124

1125+
std::string uc;
1126+
for (auto &&c : ep->getUnprocessedCommands()) {
1127+
if (auto c2 = dynamic_cast<builder::Command*>(c)) {
1128+
uc += c2->print() + "\n";
1129+
}
1130+
}
1131+
write_file(cyclic_path / "unprocessed.commands", uc);
1132+
11251133
String error = "Cannot create execution plan because of cyclic dependencies";
11261134
//String error = "Cannot create execution plan because of cyclic dependencies: strong components = " + std::to_string(n);
11271135

0 commit comments

Comments
 (0)