tree: 3f92a9374978f5be531c350ba862310775715326 [path history] [tgz]
  1. directDeps.jq
  2. distanceFromLeaves.jq
  3. filterSubtree.jq
  4. findModulesCrossPkgBoundary.jq
  5. findModulesWithNameSrcCollision.jq
  6. findModulesWithProperty.jq
  7. findModulesWithSrcType.jq
  8. findModulesWithTestSuitesValue.jq
  9. fullTransitiveDeps.jq
  10. fullTransitiveDepsProperties.jq
  11. fullTransitiveModuleTypeDeps.jq
  12. library.jq
  13. modulesOfType.jq
  14. moduleTypeStats.jq
  15. printModule.jq
  16. properties.jq
  17. query.sh
  18. README.md
  19. reverseDeps.jq
  20. transitiveDeps.jq
  21. usedVariations.jq
  22. variantTransitions.jq
json_module_graph/README.md

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
  • 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:

m json-module-graph
query.sh [-C] <command> <base-of-your-tree>/our/soong/module-actions.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