Skip to content
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

We're unable to build in Release mode but you have a change on master that fixes the issue #21

Open
2 tasks done
craigomac opened this issue Apr 3, 2020 · 8 comments

Comments

@craigomac
Copy link

Checklist

  • Reviewed the README and documents.
  • Searched existing issues for ensure not duplicated.

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 resolves Collection to SnapshotStructure.Section.Collection and that this type has no associated Element.

Detailed Description (Include Screenshots)

The change already made on master to Swift.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

  • iOS version:

12.1/13.4

  • Xcode version:

11.4

  • Devices/Simulators:

Any

  • CocoaPods/Carthage version:

1.9.0.beta.2 (issue also occurs with latest SPM release)

@philippb
Copy link

philippb commented Apr 7, 2020

Same here
Screen Shot 2020-04-06 at 6 24 02 PM

@bobek-balinek
Copy link
Contributor

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.

@craigomac
Copy link
Author

craigomac commented Apr 7, 2020

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).

@bobek-balinek
Copy link
Contributor

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.

@hernangonzalez
Copy link

+1 any news on releasing master @craigomac ?

@ra1028
Copy link
Owner

ra1028 commented Apr 11, 2020

Sorry for everyone, I completely forget to make a new release 🙏
I will make a new tag, right now

@ra1028
Copy link
Owner

ra1028 commented Apr 12, 2020

new tag and pod released.
https://github.com/ra1028/DiffableDataSources/releases/tag/0.4.0

@absoftware
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants