-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
- [ x] I've read and understood the *CONTRIBUTING guidelines and have done my best effort to follow.
Tried to [search|https://github.com/CocoaPods/CocoaPods/search?q=stack+level+too+deep&type=Issues] for issues only found either for older cocoapods version or not for subspecs
Report
What did you do?
- Updated cocoapods from 0.39 to 1.0
- Updated Podfile and Podspecs to fix install errors. (Only missing description or home page properties)
- Run pod install
What did you expected to happen?
Install all pod dependencies correctly.
What happened instead?
At the Generating Pods project, the script stopped with the following error:
SystemStackError - stack level too deep /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/target/pod_target.rb:191:in `each' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/target/pod_target.rb:191:in `flat_map' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/target/pod_target.rb:191:in `recursive_dependent_targets' This each - flat_map - recursive_dependent_targets runs for ~100 lines, then: /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/generator/xcconfig/pod_xcconfig.rb:66:in `generate' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/generator/xcconfig/pod_xcconfig.rb:35:in `save_as' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/installer/target_installer/pod_target_installer.rb:204:in `create_xcconfig_file' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/installer/target_installer/pod_target_installer.rb:22:in `block in install!' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/user_interface.rb:144:in `message' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/installer/target_installer/pod_target_installer.rb:17:in `install!' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/installer.rb:621:in `block (2 levels) in install_libraries' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/installer.rb:619:in `each' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/installer.rb:619:in `block in install_libraries' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/user_interface.rb:144:in `message' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/installer.rb:618:in `install_libraries' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/installer.rb:170:in `block in generate_pods_project' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/user_interface.rb:63:in `section' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/installer.rb:167:in `generate_pods_project' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/installer.rb:119:in `install!' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/command/install.rb:37:in `run' /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/lib/cocoapods/command.rb:50:in `run' /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0/bin/pod:55:in `<top (required)>' /usr/local/bin/pod:23:in `load' /usr/local/bin/pod:23:in `<main>'
CocoaPods Environment
Sorry sensitive information, but I will try to describe the problem:
Environment: Cocoapods 1.0.0 (0.39 also installed), ruby 2.3.0
The developer pods causing the issues have only subspecs. One of the developer pod's subspec refers to the suspec of the other and vice versa. This recursion was introduced earlier, but in the 0.39 version this was not a problem as I understand, the true recursion for target dependency resolution was only introduced in the 1.0.0 9 days ago, I believe here: ef854abI will try to reproduce the podspec environment:
In s1.podspec: Pod::Spec.new do |s1| s1.subspec 'subspecA' do |subspecA| subspecA.dependency 's2/subspecB' end s1.subspec 'subspecB' do |subspecB| subspecB.source_files = './**/*.{h,m}' end end In s2.podspec: Pod::Spec.new do |s2| s2.subspec 'subspecA' do |subspecA| subspecA.dependency 's1/subspecB' end s2.subspec 'subspecB' do |subspecB| subspecB.source_files = './**/*.{h,m}' end end
Sample app pod env (without private repos):
CocoaPods : 1.0.0 Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15] RubyGems : 2.5.1 Host : Mac OS X 10.11.4 (15E65) Xcode : 7.3.1 (7D1014) Git : git version 2.7.4 (Apple Git-66) Ruby lib dir : /Users/peterwiesner/.rvm/rubies/ruby-2.3.0/lib
Installation Source
Executable Path: /Users/peterwiesner/.rvm/gems/ruby-2.3.0/bin/pod
Plugins
cocoapods-deintegrate : 1.0.0
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.0.0
cocoapods-try : 1.0.0
Podfile
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'SubSpecCircular' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for SubSpecCircular
pod "Pod3/s3", :path => "./DeveloperPods/Pod3"
pod "Pod1", :path => "./DeveloperPods/Pod1"
pod "Pod2", :path => "./DeveloperPods/Pod2"
project "./SubSpecCircular.xcodeproj"
end
target 'SubSpecCircularTests' do
project "./SubSpecCircular.xcodeproj"
end
target 'SubSpecCircularUITests' do
project "./SubSpecCircular.xcodeproj"
end
Question
Is this a valid construction of using subspecs? (As this was correctly installed for 0.39) Can you suggest a resolution for this? (extract these subspecs to a separate developer pod)
Thank you!