[Tools] Add a tool to detect source-breaking API changes introduced from libraries. (#5236)

[Tools] Add a tool to detect source-breaking API changes introduced from libraries.

swift-api-digester is a test utility to detect source-breaking API changes
during the evolution of a swift library. The tool works on two phases:
(1) dumping library contents as a json file, and (2) comparing two json
files textually to report interesting changes.

During phase (1), the api-digester looks up every declarations inside
a module and outputs a singly-rooted tree that encloses interesting
details of the API level.

During phase (2), api-digester applies structure-information comparision
algorithms on two given singly root trees, trying to figure out, as
precise as possible, the branches/leaves in the trees that differ from
each other. Further analysis decides whether the changed leaves/branches
can be reflected as source-breaking changes for API users. If they are,
the output of api-digester will include such changes.

Also, this commit includes a regression test that make sure API changes
from the Swift stdlib are expected.
This commit is contained in:
Xi Ge
2016-10-11 19:43:01 -07:00
committed by GitHub
parent e5d77911a2
commit 452ebbc6eb
8 changed files with 104882 additions and 0 deletions

File diff suppressed because it is too large Load Diff