When adding a new function to a protocol in an API, the API Diff tool doesn't handle default implementations correctly. New requirements satisfied with a default implementation should not be marked as an API breaking change
Expected behavior
Default function implementations are handled correctly, no error reported
Actual behavior
Error reported saying API has breaking changes
Steps to reproduce
Have a public protocol on main
Switch to a new branch add-api
Add a new function to the protocol and a default implementation in an extension
Run swift package diagnose-api-breaking-changes main
Swift Package Manager version/commit hash
5.6.1
Swift & OS version (output of swift --version && uname -a)
swift-driver version: 1.45.2 Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
Target: arm64-apple-macosx12.0
Darwin Tims-MBP-2021.brokenhands.net 21.6.0 Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:22 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T6000 arm64
Description
When adding a new function to a protocol in an API, the API Diff tool doesn't handle default implementations correctly. New requirements satisfied with a default implementation should not be marked as an API breaking change
Expected behavior
Default function implementations are handled correctly, no error reported
Actual behavior
Error reported saying API has breaking changes
Steps to reproduce
main
add-api
swift package diagnose-api-breaking-changes main
Swift Package Manager version/commit hash
5.6.1
Swift & OS version (output of
swift --version && uname -a
)swift-driver version: 1.45.2 Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12) Target: arm64-apple-macosx12.0 Darwin Tims-MBP-2021.brokenhands.net 21.6.0 Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:22 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T6000 arm64