Closed JUSTINMKAUFMAN closed 3 years ago
FWIW, I am able to import swift-collections.OrderedCollections.OrderedDictionary
just fine when I import this package alone.
This line here:
cannot be used because 'swift-identified-collections' depends on 'swift-collections' 0.0.4..<1.0.0 and root depends on 'swift-collections' 0.0.3.
explains the problem. It seems that your dependency on swift-collections states that it can only use 0.0.3
and ours says we can use anything from 0.0.4
up to (but not including) 1.0.0
, and so it cannot find a version of the library in the intersection of those ranges.
I believe if you update your dependency to be 0.3.0..<1.0.0
you will be good to go.
This is also fixed in 0.1.1, if you're not ready to upgrade your other packages. Thanks!
First of all, thank you for making this library! It's something I've thought about a number of times since starting with SwiftUI and am glad there's finally a solid implementation I can use.
There appears to be an issue importing this dependency via SPM in a project that already imports the
swift-collections
package (as mine does). I use OrderedDictionary for something unrelated to my use case for IdentifiedArray, but when I try to add theswift-identified-collections
package to my manifest, I get the following error:Presumably, this is caused by the fact that your library also depends on
swift-collections
, and SPM doesn't let you import the same package twice.If I am able to access OrderedDictionary transitively via
swift-identified-collections
, then that could be a way of solving this problem (I haven't tried yet), but I'd prefer to maintain a more descriptive manifest that imports both packages separately if at all possible.