When adding a new parameter to a function in an API, the API Diff tool doesn't handle default parameters correctly. New parameters with a default value should not be marked as an API breaking change
Expected behavior
Default parameters are handled correctly, no error reported
Actual behavior
Error reported saying API has breaking changes
Steps to reproduce
Have a public function on main
Switch to a new branch add-api
Add a new parameter to function with default parameter
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 parameter to a function in an API, the API Diff tool doesn't handle default parameters correctly. New parameters with a default value should not be marked as an API breaking change
Expected behavior
Default parameters 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