This is a port of https://github.com/bazelbuild/bazel/blob/master/tools/aquery_differ/aquery_differ.py to golang.
Download and unzip a release artifact, or clone and bazel build //cmd/aquerydiff
.
aquerydiff --before <BEFORE_FILE> --after <AFTER_FILE> --report_dir <REPORT_DIR>
You can generate the <BEFORE_FILE>
(and <AFTER_FILE>
) using:
bazel aquery //pkg:target-name --output jsonproto > before.json
bazel aquery //pkg:target-name --output textproto > before.textproto
bazel aquery //pkg:target-name --output proto > before.pb
The file extensions are relevant; the proto decoder will be
protojson
if.json
,prototext
if.textproto
andproto
otherwise.
An HTML report and accessory files will be written to the given --report_dir
,
which you could serve as follows:
(cd <REPORT_DIR> && python3 -m http.server 8000) &
Report will look something like: