Skip to content

Commit

Permalink
Directly check cycle without caring about collapsation
Browse files Browse the repository at this point in the history
  • Loading branch information
axmmisaka committed Jun 24, 2023
1 parent 1bc3558 commit 6738255
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/reactor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2586,7 +2586,7 @@ export class App extends Reactor {
console.log(apg.toString());

Log.debug(this, () => "Before collapse: " + apg.toString());
const collapsed = new SortableDependencyGraph();
/* const collapsed = new SortableDependencyGraph();
// 1. Collapse dependencies and weed out the ports.
const leafs = apg.pureEffectNodes();
Expand Down Expand Up @@ -2618,9 +2618,9 @@ export class App extends Reactor {
}
// 2. Update priorities.
Log.debug(this, () => "After collapse: " + collapsed.toString());
Log.debug(this, () => "After collapse: " + collapsed.toString()); */

if (collapsed.updatePriorities(true)) {
if (!apg.hasCycle()) {
Log.global.debug("No cycles.");
} else {
throw new Error("Cycle in reaction graph.");
Expand Down

0 comments on commit 6738255

Please sign in to comment.