Open weissi opened 5 years ago
cc @nkcsgexi
@weissi, the argument name is a little bit confusing. `compare-sdk` isn't about getting the API differences between two json files but about generating migration scripts for the Swift migrator to use, e.g. which function names should be updated, etc. I'll rename the argument to be a more descriptive one.
If your intention is to get the added APIs, the tool currently doesn't support it. One way to work round this is to flip the input files to `-diagnose-sdk` invocation and all added entities should be shown as `removed` (not cool but can provide a quick glance).
Rename the argument name here: https://github.com/apple/swift/pull/24871
Awesome, thank you!
@nkcsgexi btw, is there a way to see any API that was added too?
There is currently no way to detect added APIs since the tool's main goal is to detect source-breaking and ABI breaking changes. One way to have a quick glance at the added API is to switch the order of inputs so that all added APIs will show as 'removed' ones.
Cool! Thanks for confirming, also like the idea of just swapping 🙂. The other option is to just diff the .json files with regular diff
@swift-ci create
Attachment: Download
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Bug | |Assignee | @nkcsgexi | |Priority | Medium | md5: 482a52ceef0180a99f00c791af912258Issue Description:
I've got
swift-api-digester -diagnose-sdk
to work which is really awesome but it lists only the API breakages which obvs is the most important thing.I thought
-compare-sdk
would maybe also list all the differences (ie. added functionality) but no luck there.For example
diagnose-sdk
works between NIO 1.13.2 and NIO 1.14.0 (where we had an accidental API breakage):but
compare-sdk
claims they're the same:which is odd. Diffing between the ancient NIO 1.4.0 and NIO 1.14.1 gives me the following for
diagnose-sdk
:and crashes for
compare-sdk
versions: