swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.71k stars 1.33k forks source link

API breakage tool fails to detect default parameters #5711

Open 0xTim opened 2 years ago

0xTim commented 2 years ago

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

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

tomerd commented 2 years ago

@akyrtzi I assume this belongs with api-digester, which SwiftPM shells out for this purpose. where should this be reported?

akyrtzi commented 2 years ago

\cc @nkcsgexi