RxSwift: RxCocoa error in Xcode 10 (`Cycle inside RxCocoa; building could produce unreliable results.`)

I get the following error, when I try to build a project that has RxCocoa as a dependency. 🤔

screenshot 2018-06-14 at 14 03 57

RxSwift/RxCocoa/RxBlocking/RxTest version/commit

  4.0

Platform/Environment

  • iOS
  • macOS
  • tvOS
  • watchOS
  • playgrounds

How easy is to reproduce? (chances of successful reproduce after running the self contained code)

  • easy, 100% repro
  • sometimes, 10%-100%
  • hard, 2% - 10%
  • extremely hard, %0 - 2%

Xcode version:

  Xcode 10

Level of RxSwift knowledge: (this is so we can understand your level of knowledge and formulate the response in an appropriate manner)

  • just starting
  • I have a small code base
  • I have a significant code base

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 31 (16 by maintainers)

Most upvoted comments

Cool. If the Xcode 10 branch going to keep Swift 4.0 in future versions, is no longer necessary, the develop branch is ready for Xcode 10 only using the next hook.

platform :ios, '9.0'
use_frameworks!

target 'TestRxSwift' do
  pod 'RxSwift', :git => 'https://github.com/ReactiveX/RxSwift.git', :branch => 'develop'
  pod 'RxCocoa', :git => 'https://github.com/ReactiveX/RxSwift.git', :branch => 'develop'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |configuration|
      configuration.build_settings['SWIFT_VERSION'] = "4.0"
    end
  end
end

@kzaher, if you want Xcode 10 branch will be ready for Swift 4.2, I can make the conversion. Do I it?

I solved this issue by cleaning the build folder, clearing pods cache, re-install all pods, and then rebuilding.

Have you tried this? @nicktrienensfuzz

Sent with GitHawk

@netbe Have you run pod update? Maybe, you’ve got outdated local specs repos. pod 'RxSwift', '~> 4.3' should work too and is more advisable

I solved this issue by cleaning the build folder, clearing pods cache, re-install all pods, and then rebuilding.

Ok @kzaher. I took a little while and did the update, basically the problem is with RxCocoa and RxExample, since RxSwift is Swift 4.2 code compatible. I could not pass the tests because (like in #1677 issue) runnin ./scripts/package-spm.swift twice don’t make the same content of Sources/AllTestz/main.swift so it will always modify the git working copy stoping the tests. I hope I have clarified something.