From a2d172d31d175e92d968e707b67ebb78caa0f7cb Mon Sep 17 00:00:00 2001 From: Aire-One Date: Sat, 7 Oct 2023 00:25:16 +0200 Subject: [PATCH] fix(visitors): prevent circular dependencies --- src/awesomewmdtl/visitors/module_dependencies.tl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/awesomewmdtl/visitors/module_dependencies.tl b/src/awesomewmdtl/visitors/module_dependencies.tl index 24365ef..8297268 100644 --- a/src/awesomewmdtl/visitors/module_dependencies.tl +++ b/src/awesomewmdtl/visitors/module_dependencies.tl @@ -59,7 +59,9 @@ function Module_Dependencies.visit(node: Node, mod: Node, d: Dag) local dependency = d.modules[type_name] or d.modules[utils.lowercase(type_name)] if dependency then - mod.dependencies[dependency.name] = dependency.module_path + if dependency.name ~= mod.name then + mod.dependencies[dependency.name] = dependency.module_path + end replace_in_node_type(node, dependency.module_path, dependency.name) end