-
Notifications
You must be signed in to change notification settings - Fork 32
SPM - "swift-sdk" causes package name conflicts #450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@mrtnrst Thanks for reporting. We'll take a look. |
@mrtnrst It looks like a bug in Xcode. There can be many swift packages which can share the last part of unique urls (swift-sdk, ios-sdk, etc) and Xcode is supposed to use the url (or package name) as a reference. We filed a bug report to Apple. Interestingly, you're the first user who had this issue with multiple SDKs with the same names :) |
@jaeopt looks like this is resolved in Xcode 13.3 as SPM updated to version 2 file format. I'll go ahead and close this ticket. Thanks for taking a look! |
@mrtnrst We created an aliased repo: "https://github.com/optimizely/optimizely-swift-sdk.git", same as the original one but you can use to manage the xcode name conflict. Let us know if you see any issue with the solution. Tx.
|
Thanks for the follow-up! I've already done the same mitigation step when I encountered this. |
Uh oh!
There was an error while loading. Please reload this page.
Overview
The way SPM imports happen uses the "repo name." Because of this, anyone importing this package, at any point, will conflict with other similarly named packages. Unsure of the correct course of action here, as this package is undoubtedly included in plenty of different projects.
I'll create this issue on Iterable (the other repo that initially caused this to show up) and link and tag to see if there can be a consensus on the outcome.
EDIT: Linking Iterable issue Iterable/iterable-swift-sdk#537
Example Project
I haven't made an example project, but you can recreate this issue by creating a blank project and adding both this SDK and the Iterable/swift-sdk SDK.
Workarounds
Currently, the only workaround I have found is forking the package in a separate repo to rename the repo and going from
swift-sdk
tooptimizely-swift-sdk
.The text was updated successfully, but these errors were encountered: