aboutsummaryrefslogtreecommitdiff
path: root/json_module_graph
diff options
context:
space:
mode:
authorSam Delmerico <delmerico@google.com>2023-03-01 15:55:59 -0500
committerSam Delmerico <delmerico@google.com>2023-03-01 15:55:59 -0500
commit1b6a16e775347c4f95a303cca8b1c832a25c47ce (patch)
treeeab5adf121b6a7ad5a71db8b8644fc0bca1c06c0 /json_module_graph
parent98fddb6ec56ad2bea19ccb177b7eea791acb0ddd (diff)
downloadbazel-1b6a16e775347c4f95a303cca8b1c832a25c47ce.tar.gz
remove README information that is provided by the command
Running query.sh without any arugments already provides usage information that is sometimes more details than the README. We should just pick one place for documentation and leave the other empty. The query scripts are automatically read for documentation, so they're more likely to be up-to-date than the README. Change-Id: I355273bcd37c4186771c99e0e407ba9041552964
Diffstat (limited to 'json_module_graph')
-rw-r--r--json_module_graph/README.md47
-rw-r--r--json_module_graph/distanceFromLeaves.jq4
-rw-r--r--json_module_graph/findModulesWithTestSuitesValue.jq3
-rw-r--r--json_module_graph/fullTransitiveDeps.jq2
-rw-r--r--json_module_graph/fullTransitiveDepsProperties.jq2
-rw-r--r--json_module_graph/transitiveDeps.jq2
6 files changed, 12 insertions, 48 deletions
diff --git a/json_module_graph/README.md b/json_module_graph/README.md
index b3acb057..18c1f914 100644
--- a/json_module_graph/README.md
+++ b/json_module_graph/README.md
@@ -1,53 +1,18 @@
-# JSON module graph queries
+JSON module graph queries
+=========================
This directory contains `jq` scripts that query Soong's module graph.
`jq` may be installed through your distribution's repository.
-Usage:
-
-```
-m json-module-graph
-query.sh [-C] <command> <base-of-your-tree>/out/soong/module-graph.json [argument]
-```
-
-The following commands are available:
-* `directDeps` prints the names of the direct dependencies of the given module
-* `distanceFromLeaves` prints the longest distance each module has from a leaf
- in the module graph within the transitive closure of given module
-* `filterSubtree` dumps only those modules that are in the given subtree of the
- source tree
-* `fullTransitiveDeps` returns the full transitive dependencies of the given
- module
-* `moduleTypeStats`: returns of a summary of the module types present on the
- input
-* `modulesOfType`: returns the names of modules of the input type
-* `printModule` prints all variations of a given module
-* `printModule`: returns a slightly more consise view of the input module
-* `properties`: returns the properties set in the input module, includes
- properties set via defaults
-* `transitiveDeps` prints the names of the transitive dependencies of the given
- module. $arg can be comma-separated module names
-* `usedVariations` returns a map that shows which variations are used in the
- input and what values they take
-* `variantTransitions` summarizes the variant transitions in the transitive
- closure of the given module
-* `fullTransitiveDepsProperties` returns the properties set (including via
- defaults) grouped by module type of the modules in the transitive closure of
- the given module
-
It's best to filter the full module graph to the part you are interested in
because `jq` isn't too fast on the full graph.
-To query about a module's inputs/outputs or actions:
+Usage
+-----
```
m json-module-graph
-query.sh [-C] <command> <base-of-your-tree>/our/soong/module-actions.json [argument]
+query.sh [-C] <command> <base-of-your-tree>/out/soong/module-graph.json [argument]
```
-The following commands are available:
-* `findModulesCrossPkgBoundary` prints modules with inputs that cross package
- boundaries
-* `findModulesWithNameSrcCollision` returns modules which have an input with the same
- name as the module
-* `findModulesWithSrcType` returns modules with inputs with the specified extension
+Run `./query.sh` with no arguments for additional usage information.
diff --git a/json_module_graph/distanceFromLeaves.jq b/json_module_graph/distanceFromLeaves.jq
index d48fa674..51b25bb2 100644
--- a/json_module_graph/distanceFromLeaves.jq
+++ b/json_module_graph/distanceFromLeaves.jq
@@ -1,4 +1,4 @@
-# CMD: Returns the maximum distance from a leaf for each module
+# CMD: Prints the longest distance each module has from a leaf in the module graph within the transitive closure of given module
include "library";
@@ -53,4 +53,4 @@ def variantlessDistancesFromLeaves($root):
maxDepths($m)
;
-variantlessDistancesFromLeaves($arg) \ No newline at end of file
+variantlessDistancesFromLeaves($arg)
diff --git a/json_module_graph/findModulesWithTestSuitesValue.jq b/json_module_graph/findModulesWithTestSuitesValue.jq
index 02af5975..7167bab6 100644
--- a/json_module_graph/findModulesWithTestSuitesValue.jq
+++ b/json_module_graph/findModulesWithTestSuitesValue.jq
@@ -1,5 +1,4 @@
-# CMD: Returns the modules that have test_suites property with $arg as one of its value.
-# Use $arg2 as the top level field key to be collected, e.g. Name, Blueprint.
+# CMD: Returns the modules that have test_suites property with $arg as one of its value. Use $arg2 as the top level field key to be collected, e.g. Name, Blueprint.
def hasTestSuitesWithValue($a):
.[] | select(.Name == "Test_suites") | .Values | .[] | . == $a
diff --git a/json_module_graph/fullTransitiveDeps.jq b/json_module_graph/fullTransitiveDeps.jq
index cf8fde6a..760fdcf7 100644
--- a/json_module_graph/fullTransitiveDeps.jq
+++ b/json_module_graph/fullTransitiveDeps.jq
@@ -1,4 +1,4 @@
-# CMD: Returns the modules in the transitive closure of module(s) $arg, splits on ,
+# CMD: Returns the modules in the transitive closure of module(s) $arg, splits on ","
include "library";
diff --git a/json_module_graph/fullTransitiveDepsProperties.jq b/json_module_graph/fullTransitiveDepsProperties.jq
index 23dc2a1f..e24ad3e5 100644
--- a/json_module_graph/fullTransitiveDepsProperties.jq
+++ b/json_module_graph/fullTransitiveDepsProperties.jq
@@ -1,4 +1,4 @@
-# CMD: Returns the properties of module types in the transitive closure of module(s) $arg, multiple can specified and will split on ,
+# CMD: Returns the properties (including defaults) grouped by module type of modules in the transitive closure of module(s) $arg, splits on ","
include "library";
diff --git a/json_module_graph/transitiveDeps.jq b/json_module_graph/transitiveDeps.jq
index 4d5b8128..811e1046 100644
--- a/json_module_graph/transitiveDeps.jq
+++ b/json_module_graph/transitiveDeps.jq
@@ -1,4 +1,4 @@
-# CMD: Returns the names of the transitive dependencies of the comma-separated module names, $arg
+# CMD: Returns the names of the transitive dependencies of the module(s) $arg, splits on ","
include "library";