azure-sdk-for-ios: [BUG] Xcode 16.3 compilation error: '==' operator in RequestStringConvertible triggers "'Self' required" error
Describe the bug When building the Azure SDK for iOS using Xcode 16.3, the following compile-time error occurs in the RequestStringConvertible protocol extension:
Member operator '==' must have at least one argument of type 'Self'
This error occurs due to Xcode 16.3 enforcing a rule that operator overloads in protocol extensions must include Self as a parameter type. The current implementation uses the protocol type directly.
Exception or Stack Trace
Member operator '==' must have at least one argument of type 'Self'
To Reproduce Steps to reproduce the behavior:
- Open the Azure SDK for iOS in Xcode 16.3.
- Build the project.
- Observe the compiler error in RequestStringConvertible.
Code Snippet
public extension RequestStringConvertible {
static func == (lhs: RequestStringConvertible, rhs: RequestStringConvertible) -> Bool {
return lhs.requestString == rhs.requestString
}
}
Proposed fix (already submitted in PR #2070 ):
static func == (lhs: Self, rhs: Self) -> Bool {
return lhs.requestString == rhs.requestString
}
Expected behavior The project should compile without error on Xcode 16.3.
Screenshots
Setup (please complete the following information):
- OS: iOS 18.4
- IDE : Xcode 16.3 (16E140)
- AzureCommunicationCalling_2.15.1
Additional context This change is in line with SE-0091. The fix is proposed in PR #2070
Information Checklist
- Bug Description Added
- Repro Steps Added
- Setup information Added
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 16 (14 by maintainers)
Got it. We are preparing a fix for AzureCore (https://github.com/Azure/azure-sdk-for-ios/pull/2074) but it will require an update to ACS Common (and probably Calling?) to ingest.
@tjprescott We do not directly have a dependency on AzureCore but its AzureCommunicationCommon that depends on AzureCore
Hi @tjprescott @raosanat,
Could you please let us know if there’s an estimated release date for those packages?
Thanks in advance for your help.
I ran into the same issue in Xcode 16.3.
@mattials a new version of Chat has been released that should unblock you.
@tjprescott regarding podspec here you can see the dependencies for: AzureCommunicationChat: Azure repo: https://github.com/Azure/azure-sdk-for-ios/blob/main/sdk/communication/AzureCommunicationChat/AzureCommunicationChat.podspec.json#L28 CocoaPods specs: https://github.com/CocoaPods/Specs/blob/master/Specs/d/9/9/AzureCommunicationChat/1.3.6/AzureCommunicationChat.podspec.json#L28
AzureCommunicationUICalling: Azure: https://github.com/Azure/communication-ui-library-ios/blob/main/AzureCommunicationUI/Podfile#L14 CocoaPods specs: https://github.com/CocoaPods/Specs/blob/master/Specs/2/8/d/AzureCommunicationUICalling/1.11.0/AzureCommunicationUICalling.podspec.json#L35
@yannisalexiou @mattials can you share your dependencies (podspec, package.swift, etc.)? If you are using
AzureCommunicationCallingit should not be pulling inAzureCore, direclty or indirectly, asAzureCommunicationCommondoes not have a dependency on it.i ran into same issue, waiting for changes in AzureCommunicationCommon and AzureCommunicationUICalling
AzureCore 1.0.0-beta.16 is released.
@raosanat a new release of
AzureCommunicationCommonandAzureCommunicationCallingis necessary to actually resolve this issue. Can you help facilitate this?