Skip to content

Commit 0fac4c0

Browse files
committed
Include module version when drawing the graph
This is a temporary hack to make graphs better.
1 parent 8b8329f commit 0fac4c0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

β€Žbin/blin.p6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,10 @@ for $to-visualize.keys -> $module {
366366
when ZefFailure { β€˜crimson’ }
367367
when UnhandledException { β€˜hotpink’ }
368368
}
369-
$dot ~= β€œ "{$module.name}" [color=$color];\n”;
369+
$dot ~= β€œ "{$module.handle}" [color=$color];\n”;
370370
for $module.depends.keys {
371371
next unless $_ ∈ $to-visualize;
372-
$dot ~= β€œ "{$module.name}" -> "{.name}";\n”;
372+
$dot ~= β€œ "{$module.handle}" -> "{.handle}";\n”;
373373
}
374374
$dot ~= β€œ\n”;
375375
}

β€Žlib/Blin/Module.pm6

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ has Str @.errors;
1010
has Bool $.visited;
1111
has Promise $.done = Promise.new;
1212

13-
method install-path {
13+
method handle {
1414
# TODO surely we can do better to ensure it won't clash
15-
β€˜installed/’ ~ $.name ~ β€˜_’ ~ $.version
15+
$.name ~ β€˜_’ ~ $.version
16+
}
17+
18+
method install-path {
19+
β€˜installed/’ ~ self.handle
1620
}
1721

1822
method deps($leaf = False) {

0 commit comments

Comments
Β (0)