Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Android: Add target graph to dependency analysis
Added a new target graph alongside class and package graphs. This new graph allows easy access to dependency relationships between build targets (e.g. targetA depends on targetB because class A1 depends on B3 and class A2 depends on B8). This target graph will later be used by dep_operations.py and associated dependency management commands to better understand actual relationships between build targets and speed up the process of identifying unused dependencies (by not attempting to test removal of already known necessary deps). Some other improvements include: - Speed up calls to jdeps by caching jdeps output in the output dir and invalidating the cache when the jar file is updated. - Use string matching for identifying package/class/nested names. This cuts the time used by these methods from 3s to 1.5s. - Fix all type issues as identified by Pylance in VS Code. Including using Generics for graph.Graph. - Add automatic output dir detection, so the only required arg is now just the output file (-o output.json). - Add support for specifying which packages are interesting as well as support for generating graphs that include all known classes via `--prefixes`. - Add logging support and `-v` for full logs. - Remove some no-longer needed pylint comments. - Ensure that all missing jars are expected, namely either _bundle_module targets or one of the ones listed at the top. - Add automatic re-building of sub-targets when jars are missing. - Added unittests for new codepaths. Bug: 1258168 Change-Id: I3e92fd0de3d14d2f50dabdae7bea7644d5c08e37 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4003034 Commit-Queue: Peter Wen <wnwen@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Auto-Submit: Peter Wen <wnwen@chromium.org> Cr-Commit-Position: refs/heads/main@{#1069778}
- Loading branch information
Peter Wen
authored and
Chromium LUCI CQ
committed
Nov 10, 2022
1 parent
69b93e4
commit d3eff6d
Showing
16 changed files
with
679 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.