• Home
Name Date Size #Lines LOC

..--

BUILD.bazelD06-Sep-20242.1 KiB8072

README.mdD06-Sep-20242.4 KiB7150

bp2build_module_dep_infos.pyD06-Sep-20245.3 KiB187136

bp2build_progress.pyD06-Sep-202429.9 KiB937785

bp2build_progress_test.pyD06-Sep-202454.7 KiB1,6521,486

dependency_analysis.pyD06-Sep-202418.8 KiB623458

dependency_analysis_test.pyD06-Sep-202422.9 KiB819682

queryview_xml.pyD06-Sep-20241.7 KiB6036

soong_module_json.pyD06-Sep-20241.4 KiB6440

README.md

1# bp2build progress graphs
2
3This directory contains tools to generate reports and .png graphs of the
4bp2build conversion progress, for any module.
5
6This tool relies on `json-module-graph` and `bp2build` to be buildable targets
7for this branch.
8
9## Prerequisites
10
11* `/usr/bin/dot`: turning dot graphviz files into .pngs
12
13Tip: `--use_queryview=true` runs `bp2build_progress.py` with queryview.
14
15## Instructions
16
17### Syntax
18
19```sh
20b run //build/bazel/scripts/bp2build_progress -- <mode> <flags> ...
21```
22
23Flags:
24
25* --module, -m : Name(s) of Soong module(s). Multiple modules only supported for report.
26* --type, -t : Type(s) of Soong module(s). Multiple modules only supported in report mode.
27* --package-dir, -p: Package directory for Soong modules. Single package directory only supported for report.
28* --recursive, -r: Whether to perform recursive search when --package-dir or -p flag is passed.
29* --use-queryview: Whether to use queryview or module_info.
30* --ignore-by-name : Comma-separated list. When building the tree of transitive dependencies, will not follow dependency edges pointing to module names listed by this flag.
31* --ignore-java-auto-deps : Whether to ignore automatically added java deps.
32* --banchan : Whether to run Soong in a banchan configuration rather than lunch.
33* --show-converted, -s : Show bp2build-converted modules in addition to the unconverted dependencies to see full dependencies post-migration. By default converted dependencies are not shown.
34* --hide-unconverted-modules-reasons: Hide unconverted modules reasons of heuristics and bp2build_metrics.pb. By default unconverted modules reasons are shown.
35
36### Examples
37
38#### Generate the report for a module, e.g. adbd
39
40```sh
41b run //build/bazel/scripts/bp2build_progress:bp2build_progress \
42  -- report -m <module-name>
43```
44
45or:
46
47```sh
48b run //build/bazel/scripts/bp2build_progress:bp2build_progress \
49  -- report -m <module-name> --use-queryview
50```
51
52When running in report mode, you can also write results to a proto with the flag
53`--proto-file`
54
55#### Generate the graph for a module, e.g. adbd
56
57```sh
58b run //build/bazel/scripts/bp2build_progress:bp2build_progress \
59  -- graph -m adbd -o /tmp/graph.in && \
60  dot -Tpng -o /tmp/graph.png /tmp/graph.in
61```
62
63or:
64
65```sh
66b run //build/bazel/scripts/bp2build_progress:bp2build_progress \
67  -- graph -m adbd --use-queryview -o /tmp/graph.in && \
68  dot -Tpng -o /tmp/graph.png /tmp/graph.in
69```
70Note: Currently, file output paths cannot be relative (b/283512659).
71