aboutsummaryrefslogtreecommitdiff
path: root/examples/tomodeps/tomodeps.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-15 14:22:11 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-15 14:22:11 -0400
commitf51acef40e8297d7bd41b774413aa8331ca946ed (patch)
tree56aa02541d60beb3ece496fed2c11afd3ae942f3 /examples/tomodeps/tomodeps.tm
parent7a2653501310825e02d99d51fb4b9f1aacc75214 (diff)
Overhaul of Path so it uses root and array of components instead of
stringly typed
Diffstat (limited to 'examples/tomodeps/tomodeps.tm')
-rw-r--r--examples/tomodeps/tomodeps.tm6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/tomodeps/tomodeps.tm b/examples/tomodeps/tomodeps.tm
index 93e3eb42..279e5051 100644
--- a/examples/tomodeps/tomodeps.tm
+++ b/examples/tomodeps/tomodeps.tm
@@ -36,7 +36,7 @@ func _build_dependency_graph(dep:Dependency, dependencies:@{Dependency,{Dependen
dir := (~/.local/share/tomo/installed/$module)
module_deps := @{:Dependency}
visited := @{:Path}
- unvisited := @{f:resolved() for f in dir:files() if f:ends_with(".tm")}
+ unvisited := @{f:resolved() for f in dir:files() if f:extension() == ".tm"}
while unvisited.length > 0:
file := unvisited.items[-1]
unvisited:remove(file)
@@ -66,9 +66,9 @@ func _printable_name(dep:Dependency -> Text):
is File(f):
f = f:relative()
if f:exists():
- return "$(f.text)"
+ return Text(f)
else:
- return "$(\x1b)[31;1m$(f.text) (not found)$(\x1b)[m"
+ return "$(\x1b)[31;1m$(f) (not found)$(\x1b)[m"
func _draw_tree(dep:Dependency, dependencies:{Dependency,{Dependency}}, already_printed:@{Dependency}, prefix="", is_last=yes):
if already_printed:has(dep):