• Home
Name Date Size #Lines LOC

..--

README.mdD03-May-20241.2 KiB3326

directDeps.jqD03-May-202496 32

distanceFromLeaves.jqD03-May-20241.1 KiB5445

filterSubtree.jqD03-May-2024172 96

fullTransitiveDeps.jqD03-May-2024182 117

library.jqD03-May-20242.8 KiB11989

printModule.jqD03-May-2024380 1311

query.shD03-May-2024548 3828

transitiveDeps.jqD03-May-2024102 64

usedVariations.jqD03-May-2024160 76

variantTransitions.jqD03-May-2024526 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