tree: 55489b4021def8dac03142b836006eddaacc7891 [path history] [tgz]
  1. BUILD.gn
  2. OWNERS
  3. README.md
  4. main.go
tools/fidl/fidl_api_diff/README.md

fidl_api_diff

The program fidl_api_diff computes the difference between two FIDL API surfaces as described by the FIDL API summary JSON format.

Set

The first set, //tools, is needed to ensure that the testing utilities are present.

fx set core.qemu-x64 --auto-dir \
   --with=//tools \
   --with=//tools/fidl

Compile

fx build tools/fidl/fidl_api_diff

Test

fx test tools/fidl/fidl_api_diff

Example use

The following script demonstrates the use of the program for diffing an API of an in-tree FIDL library.

#!/bin/bash
readonly _build_dir="$(fx get-build-dir)"
mkdir -p "${HOME}/tmp"
fx build tools/fidl
"${_build_dir}/host_x64/fidl_api_summarize" \
  --before-file "$HOME/tmp/before.api_summarize.json" \
  --after-file "$HOME/tmp/after.api_summarize.json" \
  --api-diff-file "$HOME/tmp/result.api_diff.json" \
  "${@}"