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

Compiler error with Xcode 10.2 (10E125) with Apollo cocoapod 0.9.5 #485

Closed
commanda opened this issue Mar 26, 2019 · 29 comments
Closed

Compiler error with Xcode 10.2 (10E125) with Apollo cocoapod 0.9.5 #485

commanda opened this issue Mar 26, 2019 · 29 comments

Comments

@commanda
Copy link

Compiler error:

/Users/amanda/Playpen/Fresh/Pods/Apollo/Sources/Apollo/Collections.swift:65:42: Cannot assign value of type 'EnumeratedSequence<[Key]>.Iterator' to type 'EnumeratedSequence<IndexingIterator<Array<Key>>>.Iterator'

Repro steps:

  • Update to Xcode 10.2 (10E125)
  • Create a fresh Xcode project
  • pod init
  • Add pod Apollo to the Podfile
  • pod install
  • See that cocoapods installed Apollo (0.9.5)
  • Open the .xcworkspace
  • Attempt to compile the project
  • See the compiler error

I tried setting the Swift language version to 4, 4.2, or 5, and also tried setting the same on the Apollo project, but I still got the compiler error.

Podfile:

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'Fresh' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Fresh
  pod 'Apollo'

end
@commanda
Copy link
Author

When I point my podfile at the latest from master at github instead of using the most recent release, the compiler error is fixed.
pod 'Apollo', :git => 'https://github.com/apollographql/apollo-ios.git'
I think this means a new release is due?

@philipengberg
Copy link

philipengberg commented Mar 27, 2019

Pointing to the master branch certainly works, but for me at least, it results in insanely slow compile times (from normally 15 seconds 👉 8-10 minutes). Now, I of course cannot say for sure that this is caused by Apollo specifically, but this is literally the only change I've made to get my project to compile in Xcode 10.2.

@jnutting
Copy link

Yes, and pointing at master is never fun in the long run. It would really be great to have an official release that works with Swift 5!

@martijnwalraven
Copy link
Contributor

We're waiting for Travis to update to Xcode 10.2, so we can land #475.

@philipengberg
Copy link

... The intricate dependency graph of the World Wide Web 😅

@musicdev20
Copy link

What's your ETA on this? I need this to work because I have a dependency that is failing. Thanks!

@jnutting
Copy link

If you're in a really tight spot, @GiantBlue76, you can either point at master or do a temporary local fix - just change the type of the variable that it's complaining about in the 0.9.5 code to match what the compiler expects. I did so, and everything worked just fine.

@MaxDesiatov
Copy link
Contributor

FIY Travis does support Xcode 10.2, I'm using it in graphql-community/ApolloAlamofire#3 test builds. I've just added created draft #491 in Apollo repository, but not sure how to start Travis build for that PR, can anyone help please?

@martijnwalraven
Copy link
Contributor

@MaxDesiatov I don't think that is Xcode 10.2 final yet, see https://travis-ci.community/t/update-to-xcode-10-2-release/2809/2. As far as I know, that's why #475 is still failing.

@vandadnp
Copy link

Time to start using CircleCI perhaps? Travis has historically been quite slow in their support of new macOS/Xcode versions. CircleCI as of right now already supports Xcode 10.2!

@commanda
Copy link
Author

@vandadnp Nope, CircleCI is still on beta 3 of Xcode 10.2. I'm waiting on them to get the GM too.

@vandadnp
Copy link

@commanda you're right. They didn't explicitly state that it's a beta but they did provide the build number of 10P99q which is in fact beta!

@vandadnp
Copy link

vandadnp commented Mar 28, 2019

I contacted Travis' support and this is their reply:

Thank you for getting in touch!

We're hopefully aiming to have the GA version of Xcode 10.2 available by the end of the week. I'd recommend keeping an eye on https://blog.travis-ci.com/ as we'll most likely make an announcement when it's available.

Hopefully, this helps. Don't hesitate to get in touch if you have any questions or concerns. We'd be happy to help.

Sincerely,
Carla

🤞

@musicdev20
Copy link

If you're in a really tight spot, @GiantBlue76, you can either point at master or do a temporary local fix - just change the type of the variable that it's complaining about in the 0.9.5 code to match what the compiler expects. I did so, and everything worked just fine.

Yep, but it doesn't help me for transient dependencies. In other words, I have a pod that uses Apollo, but then I have an application that depends on that pod. So that application just uses the podspec to manage the dependency, therefore it pulls the latest version. Everytime I do a pod update, I need to change the code myself. It's also a bit of a pain when attempting to document how to set up the project for the rest of our co-workers :D. Glad that it will be officially released soon. Thanks!

@bradleycwells
Copy link

Is there any way I can be notified on an update for this release? I got Apollo as an dependent in my podspec and it fails when I do pod repo push

@ileitch
Copy link

ileitch commented Mar 29, 2019

GitHub supports watching only for releases:
Screen Shot 2019-03-29 at 2 34 22 PM

@karlisl
Copy link

karlisl commented Mar 29, 2019

@martijnwalraven Update is out! https://blog.travis-ci.com/2019-03-29-xcode-10-2-gm-is-now-available

@victormihaita
Copy link

Since the update for travis is out, do we have any news for the new pod version?

@martijnwalraven
Copy link
Contributor

@victormihaita I merged #475, but I wanted to get #466 in before publishing a new release.

@musicdev20
Copy link

This is great news. Is the release going to be out today?

@martijnwalraven
Copy link
Contributor

This should be fixed in 0.10.0.

@niteshtak
Copy link

when the release will go out for XCode 10.2 support ?

@martijnwalraven
Copy link
Contributor

@niteshtak I just released it!

@niteshtak
Copy link

@martijnwalraven I noticed the build time increased significantly after the 0.10.0 release :(

@philipengberg
Copy link

Exactly as I noted with the pre-release #485 (comment)

@martijnwalraven
Copy link
Contributor

@niteshtak @philipengberg I have no idea what could be causing this, so all insight is welcome!

@philipengberg
Copy link

Me neither, and I don't know if Xcode 10.2 itself has equal fault in it. I've reverted to Xcode 10.1, since I won't have time to troubleshoot in a foreseeable future 😞

@antonbremer
Copy link

antonbremer commented Apr 3, 2019

Me neither, and I don't know if Xcode 10.2 itself has equal fault in it. I've reverted to Xcode 10.1, since I won't have time to troubleshoot in a foreseeable future 😞

Thanks for all the hard work you put in it @martijnwalraven and others. Likewise @philipengberg unfortunately I am not in a position to help troubleshoot at the moment. I will also roll back to Xcode 10.1. Keep up the good work though!

@Ded77
Copy link

Ded77 commented Apr 19, 2019

I haved the build time issue too with Xcode 10.2 but It's fixed for me with Xcode 10.2.1, in debug.
When I try to archive, It's still too slow 😞

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