Commit Graph

211 Commits

Author SHA1 Message Date
Xi Ge
87d22acb67 [swift-api-digester] Ensure we exclude decls of low accessibility from the API comparison. (#5382) 2016-10-20 12:02:37 -07:00
Xi Ge
647f65ea21 swift-api-digester: teach the tool to output constructors' parameter type changes. (#5351) 2016-10-18 13:03:21 -07:00
Bob Wilson
1caba3e209 Merge remote-tracking branch 'origin/master' into master-next 2016-10-17 11:52:21 -07:00
Bob Wilson
9cc68d6c9f Update for clang r283671: remove use of clEnumValEnd. 2016-10-15 11:02:20 -07:00
Xi Ge
8212646c10 [swift-api-digester] caching the equality comparison results among SDKNodes. (#5297)
During the lifetime of analysing source-breaking changes, we may compare
the equality of two SDKNodes more than once, which makes the comprison
results amenable for caching. This patch implemented it. NFC
2016-10-14 16:21:19 -07:00
Argyrios Kyrtzidis
54163ee243 [swift-api-digester] Add option to be able to pass a system framework search path. 2016-10-14 15:25:21 -07:00
practicalswift
6a614767f5 Clean up swift-api-digester: Remove dead code. Fix typos. Fix headers. (#5280) 2016-10-14 11:32:25 -07:00
Xi Ge
edea59722e api-digester: teach the tool to detect new mutating/throwing functions (#5284) 2016-10-13 21:04:39 -07:00
Xi Ge
55f194b3ef api-digester: in module dump, record whether a func decl is mutating. 2016-10-13 11:57:42 -07:00
Xi Ge
ab9b035dbc [test] api-digester: add a test to ensure the dumped module content is expected. 2016-10-13 11:53:07 -07:00
Xi Ge
452ebbc6eb [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.
2016-10-11 19:43:01 -07:00