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

fidl_api_diff

The program fidl_api_diff computes the difference between two FIDL API summaries produced by fidl_api_summarize. Its focus is API, but it also has limited support for detecting breaking ABI changes. It wraps the //tools/fidl/lib/apidiff library.

Build

fx set core.x64 --with //tools/fidl
fx build host-tools/fidl_api_diff

Example use

summarize() {
    echo "$1" > test.fidl
    $(fx get-build-dir)/host_x64/fidlc --json test.json --files test.fidl
    fx fidl_api_summarize --output-file /dev/stdout --fidl-ir-file test.json
}

summarize "library l; type T = table {};" > before.json
summarize "library l; type T = table { 1: b bool; };" > after.json

fx fidl_api_diff --api-diff-file /dev/stdout \
    --before-file before.json --after-file after.json