[POC] Script to compare API of 2 versions of the SDK
This is a POC to play with swift api-digester / swift package diagnose-api-breaking-changes commands that I learned about today.
My hope was to experiment if we could use those commands to e.g. detecting breaking changes in the API between versions, in order to help us decide on major version bump during new releases, or generating automated API changelogs, etc.
As I explored the commands I figured maybe it could be useful, so I created this Draft PR not particularly with the intent of it being merged, but rather just to be able to save my script and experiment somewhere instead of keeping it on my Mac.
References
- https://forums.swift.org/t/swift-package-diagnose-api-breaking-changes/54308
- https://forums.swift.org/t/the-way-to-run-diagnose-api-breaking-changes-for-ios/58153/9
- the Swift-Evolution proposal in which I discovered the existence of
diagnose-api-breaking-changesin the first place that led me to this rabbit hole - Internal post: paaHJt-8vX-p2
Example output
Running ./compare-api.sh 3.2.0-rc.1 from this branch:
Running /.compare-api.sh 2.1.1 3.0.0:
| 1 Error | |
|---|---|
| :no_entry_sign: | You need to add at least one label to this PR |
Generated by :no_entry_sign: Danger
@andrewdmontgomery I figured you might be curious about this 🙂 Also shared some info about the idea in internal post paaHJt-8vX-p2
📲 You can test the changes from this Pull Request in Gravatar Prototype Build by scanning the QR code below to install the corresponding build.
| App Name | Gravatar Prototype Build | |
| Build Number | 2406 | |
| Version | PR #773 | |
| Bundle ID | com.automattic.gravatar-sdk-demo-uikit.prototype-build | |
| Commit | d3081e6d71f36f64c26bb15c89a7220c5380161f | |
| Installation URL | 4qurbi1b6sq3g |