aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTimo Paulssen <timonator@perpetuum-immobile.de>2016-04-02 14:06:03 +0200
committerTimo Paulssen <timonator@perpetuum-immobile.de>2016-04-02 14:06:03 +0200
commitc638e3235d160e1cf015539099c27333ab61553c (patch)
tree8ca0bd18c596c1af3d4fdcd89b4388e5a4b56c02 /tools
parent7822d78ec86722fe4b043e4642ff72da554d6b74 (diff)
output revdeps, fix array assignment from set.
Diffstat (limited to 'tools')
-rw-r--r--tools/star/analyze_module_dependencies.p612
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/star/analyze_module_dependencies.p6 b/tools/star/analyze_module_dependencies.p6
index dae5090..44f027f 100644
--- a/tools/star/analyze_module_dependencies.p6
+++ b/tools/star/analyze_module_dependencies.p6
@@ -1,5 +1,6 @@
my %depended-on := SetHash.new;
my @has-names;
+my %revdeps;
use JSON::Fast;
@@ -20,17 +21,24 @@ for qx{ ls modules/*/META* }.lines -> $jf {
# record every dependency in our set
%depended-on{@$val}>>++;
+ %revdeps{$data<name>}.append: @$val;
}
}
+say "reverse dependencies:";
+say "";
+.say for %revdeps;
+say "";
+say "";
+
# exclude a few modules:
# Panda doesn't have a META.info
# Test is shipped with Rakudo
# NativeCall is also shipped with rakudo
# nqp isn't really a module.
-my @missing = %depended-on (-) @has-names (-) <Panda Test NativeCall nqp>;
+my @missing = (%depended-on (-) @has-names (-) <Panda Test NativeCall nqp>).list;
-with @missing {
+if @missing {
say "There are some modules that are depended on, but not in the modules list.";
.say for @missing;
} else {