hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 8a4e54679eef4b81c1e2160528d969d528638d4d
parent 5144db2d76c95a3b2538bb3333b04efa167423d0
Author: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Date:   Tue,  1 Oct 2024 18:03:29 +0200

cmd/hare: Print modules without dependencies

They were already printed in the default deps_fmt::TERM output, but
missing from the deps_fmt::DOT output.

Signed-off-by: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>

Diffstat:
Mcmd/hare/deps.ha | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cmd/hare/deps.ha b/cmd/hare/deps.ha @@ -90,7 +90,9 @@ fn deps(name: str, cmd: *getopt::command) (void | error) = { case deps_fmt::DOT => fmt::println("strict digraph deps {")!; for (let mod .. mods) { - for (let dep .. mod.deps) { + if (module::gathered(&mod) && len(mod.deps) == 0) { + fmt::printfln("\t\"{}\"", mod.name)!; + } else for (let dep .. mod.deps) { const child = mods[dep.0]; fmt::printfln("\t\"{}\" -> \"{}\";", mod.name, child.name)!;