swiftlang / swift-package-manager

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

API breakage tool fails to detect default protocol implementations #5712

Open 0xTim opened 2 years ago

0xTim commented 2 years ago

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

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