Open craigomac opened 4 years ago
Same here
Oh, it looks like It's not just me that has experienced this issue then!
I have found a working solution to this, which is simply adding a namespace to the Collection type. I'm assuming whatever changes that went to the latest Swift compiler prevent it from making sense of this particular generic constraint.
Changing this:
init<C: Collection>(source: Section, elements: C) where C.Element == Item {
into:
init<C: Swift.Collection>(source: Section, elements: C) where C.Element == Item {
has resolved this issue for me (for both Debug and Release scheme).
I'm happy to provide a PR that fixes this.
The change to fix this is already on the master
branch of this project. All that needs to happen is for the maintainer to make a release, and we'll be able to compile again using that release as a dependency.
For now, we've resolved it in our app by depending directly on the master
branch of this GitHub repo (you can do this from Xcode if you're using SPM or from CocoaPods with a branch argument on the pod dependency).
Noted, I've been using my own fork for a while and I haven't noticed changes to the master branch - hopefully a release will follow.
+1 any news on releasing master @craigomac ?
Sorry for everyone, I completely forget to make a new release 🙏 I will make a new tag, right now
new tag and pod released. https://github.com/ra1028/DiffableDataSources/releases/tag/0.4.0
Yes, I used
pod 'DiffableDataSources', '0.4.0'
but
pod install --repo-update
is required to detect new version. Otherwise I was getting error:
[!] CocoaPods could not find compatible versions for pod "DiffableDataSources":
In Podfile:
DiffableDataSources (= 0.4.0)
None of your spec sources contain a spec satisfying the dependency: `DiffableDataSources (= 0.4.0)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Checklist
Expected Behavior
We should be able to build in Release mode.
Current Behavior
In Xcode 11.4 only, building the framework in Release mode fails. The error is in
SnapshotStructure.swift
on line 38: the compiler complains that it resolvesCollection
toSnapshotStructure.Section.Collection
and that this type has no associatedElement
.Detailed Description (Include Screenshots)
The change already made on
master
toSwift.Collection
resolves this issue, but it's not yet in a release.Please can you make a new release including this change?
Environment
version:
Swift version:
5.0
12.1/13.4
11.4
Any
1.9.0.beta.2 (issue also occurs with latest SPM release)