Skip to content

Commit

Permalink
Include module version when drawing the graph
Browse files Browse the repository at this point in the history
This is a temporary hack to make graphs better.
  • Loading branch information
AlexDaniel committed Nov 20, 2018
1 parent 8b8329f commit 0fac4c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/blin.p6
Expand Up @@ -366,10 +366,10 @@ for $to-visualize.keys -> $module {
when ZefFailure { β€˜crimson’ }
when UnhandledException { β€˜hotpink’ }
}
$dot ~= β€œ "{$module.name}" [color=$color];\n”;
$dot ~= β€œ "{$module.handle}" [color=$color];\n”;
for $module.depends.keys {
next unless $_ ∈ $to-visualize;
$dot ~= β€œ "{$module.name}" -> "{.name}";\n”;
$dot ~= β€œ "{$module.handle}" -> "{.handle}";\n”;
}
$dot ~= β€œ\n”;
}
Expand Down
8 changes: 6 additions & 2 deletions lib/Blin/Module.pm6
Expand Up @@ -10,9 +10,13 @@ has Str @.errors;
has Bool $.visited;
has Promise $.done = Promise.new;

method install-path {
method handle {
# TODO surely we can do better to ensure it won't clash
β€˜installed/’ ~ $.name ~ β€˜_’ ~ $.version
$.name ~ β€˜_’ ~ $.version
}

method install-path {
β€˜installed/’ ~ self.handle
}

method deps($leaf = False) {
Expand Down

0 comments on commit 0fac4c0

Please sign in to comment.