• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

README.mdD22-Nov-20231.2 KiB3326

directDeps.jqD22-Nov-202396 32

distanceFromLeaves.jqD22-Nov-20231.1 KiB5445

filterSubtree.jqD22-Nov-2023172 96

fullTransitiveDeps.jqD22-Nov-2023182 117

library.jqD22-Nov-20232.8 KiB11989

printModule.jqD22-Nov-2023380 1311

query.shD22-Nov-2023548 3828

transitiveDeps.jqD22-Nov-2023102 64

usedVariations.jqD22-Nov-2023160 76

variantTransitions.jqD22-Nov-2023526 1512

README.md

1# JSON module graph queries
2
3This directory contains `jq` scripts that query Soong's module graph.
4
5It uses the JSON module graph that Soongs dumps when the
6`SOONG_DUMP_JSON_MODULE_GRAPH` environment variable is set.
7
8Usage:
9
10```
11SOONG_DUMP_JSON_MODULE_GRAPH=<some file> m nothing
12query.sh [-C] <command> <some file> [argument]
13```
14
15The following commands are available:
16* `printModule` prints all variations of a given module
17* `filterSubtree` dumps only those modules that are in the given subtree of the
18  source tree
19* `directDeps` prints the names of the direct dependencies of the given module
20* `transitiveDeps` prints the names of the transitive dependencies of the given
21  module
22* `fullTransitiveDeps` returns the full transitive dependencies of the given
23   module
24* `distanceFromLeaves` prints the longest distance each module has from a leaf
25  in the module graph within the transitive closure of given module
26* `usedVariations` returns a map that shows which variations are used in the
27  input and what values they take
28* `variantTransitions`  summarizes the variant transitions in the transitive
29  closure of the given module
30
31It's best to filter the full module graph to the part you are interested in
32because `jq` isn't too fast on the full graph.
33