IGListKit
IGListKit copied to clipboard
Need tagged releases in order to use IGListKit SPM package as a dependency of another package
New issue checklist
- [x] I have reviewed the
READMEand documentation - [x] I have searched existing issues and this is not a duplicate
- [x] I have attempted to reproduce the issue and include an example project.
General information
IGListKitversion: head of main branch, currently501cccc- iOS version(s): 15+
- CocoaPods/Carthage version: n/a
- Xcode version: 14.2
- Devices/Simulators affected: All
- Reproducible in the demo project? (Yes/No):
- Related issues:
Debug information
# Please include debug logs using the following lldb command:
po [IGListDebugger dump]
We have an app which uses an in-house library, in SPM form. That library has a dependency on IGListKit. Until recently the app wasn't pinning the library to a specific version, and nor was Package.swift in the library pinning IGListKit:
.package(url: "https://github.com/Instagram/IGListKit", branch: "main"),
That's not ideal though - we want to be more deliberate about dependency versions. Pinning the in-house library to a specific version results in an Xcode error of the form:
Failed to resolve dependencies
Dependencies could not be resolved because root depends on '{ourLibrary}' 0.0.2..<0.1.0.
'{ourLibrary}' >= 0.0.2 cannot be used because ...
no versions of '{ourLibrary}' match the requirement 0.0.3..<0.1.0
and package '{ourLibrary}' is required using a stable-version
but '{ourLibrary}' depends on an unstable-version package 'iglistkit'.
Which is Xcode's way of telling us that branch: "main" isn't acceptable to it. Pinning to a specific commit doesn't solve the problem. From the Swift Package docs:
Note that packages which use branch-based dependency requirements can’t be added as dependencies to packages that use version-based dependency requirements; you should remove branch-based dependency requirements before publishing a version of your package.
and
Note that packages which use commit-based dependency requirements can’t be added as dependencies to packages that use version-based dependency requirements; you should remove commit-based dependency requirements before publishing a version of your package.
By forking IGListKit and adding a tag of my own to that, I can confirm that that is all that is needed to resolve this. It's 3+ years since this project made a tagged release, but as SPM adoption ramps up the lack of tagged releases is likely to be problematic for anybody following this pattern.
Hey @ChrisLawther-KitmanLabs! Thanks for letting us know! I'm trying to get v5.0 tagged and shipped ASAP, so hopefully this will also resolve this issue at the same time.
IGListKit v5.0 has now shipped, so this should now be resolved! Please open a new issue if you end up experiencing any other issues with this. Thanks!