rubymotion-community / BubbleWrap

Cocoa wrappers and helpers for RubyMotion (Ruby for iOS and OS X) - Making Cocoa APIs more Ruby like, one API at a time. Fork away and send your pull requests
Other
1.18k stars 207 forks source link

stack-level-too-deep-ing with 1.2.0 #214

Closed Atastor closed 11 years ago

Atastor commented 11 years ago

Getting the following error:

mormegil:Project michaelp$ rake
     Build ./build/iPhoneSimulator-6.1-Development
rake aborted!
stack level too deep
/Users/michaelp/.rvm/gems/ruby-1.9.3-p392/gems/rake-10.0.4/lib/rake/task.rb:188
Tasks: TOP => default => simulator => build:simulator
(See full trace by running task with --trace)
mormegil:SkyLight michaelp$ bundle show bubble-wrap
/Users/michaelp/.rvm/gems/ruby-1.9.3-p392/gems/bubble-wrap-1.2.0

After hints in the rubymotion group (https://groups.google.com/forum/#!searchin/rubymotion/stack$20level$20too$20deep/rubymotion/Dh7uhfszZJs/dYB2sexqsW4J) I downgraded to pre-1.2 and it worked again. My Gemfile now is

source 'https://rubygems.org'

gem "bundler"
gem "rake"

gem "ProMotion", :git => "git://github.com/clearsightstudio/ProMotion.git"
gem "bubble-wrap", "< 1.2"
gem "sugarcube"
gem "formotion"
gem 'ProMotion-formotion'
clayallsopp commented 11 years ago

Does adding app.detect_dependencies = false to your Motion::Project::App.setup block change anything?

Atastor commented 11 years ago

Quick-checking it right now, seems to avoid the problem as well!

clayallsopp commented 11 years ago

Hmm yeah so this is a RubyMotion bug =\

If you can reproduce this with a test app let me know, I can take a closer look and/or submit it to Hipbyte.

sajoku commented 11 years ago

I've been getting the same error. Any idea in what direction I have to search?

Atastor commented 11 years ago

Thanks Clay!

I am trying to build a minimum app, but alas the process is showing me that I so far lack a thorough understanding of the Rakefile/Gemfile/Bundler dependency management mechanisms.

I will keep trying, but time is short this afternoon.

Regards Michael

clayallsopp commented 11 years ago

@sajoku did you turn off app.detect_dependencies?

The general pattern for debugging + confirm this is to open /Library/RubyMotion/lib/motion/project/builder.rb and find the line + edit the code to add some puts:

puts "Before dependencies"
# Resolve file dependencies
if config.detect_dependencies == true
  deps = Dependency.new(config.files).run
  puts "Calculated dependencies #{deps}"
  config.dependencies = deps.merge(config.dependencies)
  puts "All dependencies #{config.dependencies}"
end

puts "Dependencies calculated"

builder_i = 0
config.ordered_build_files.each do |path|
   builders[builder_i][0] << path
   builder_i += 1
   builder_i = 0 if builder_i == builders_count
 end

puts "Builders fed"

# Further down

FileUtils.touch(objs_build_dir) if any_obj_file_built

puts "files arranged"

Usually something in here breaks and you won't see the output; I can't remember exactly where it breaks with this error, but poke around there.

simonedamico commented 11 years ago

It seems they have fixed it http://hipbyte.myjetbrains.com/youtrack/issue/RM-112

clayallsopp commented 11 years ago

Ah very cool, for anyone interested: https://github.com/HipByte/RubyMotion/commit/ddacbaf655b3bc786a3c206a902ed6a0cdabcb91

Looks like it should show up in the next release of RubyMotion. So at that time we'll bump BubbleWrap's required RubyMotion version to match and issue an update in RubyGems (sound good @jamesotron?)

clayallsopp commented 11 years ago

Going to close this since RubyMotion 2.0 is out with the above fix; let me know if this issue re-occurs.