archan937 / lock-o-motion

Require and mock Ruby gems (including their dependencies) within RubyMotion applications
https://rubygems.org/gems/lock-o-motion
MIT License
23 stars 2 forks source link

parslet causes stack level too deep during rake #1

Open DougPuchalski opened 11 years ago

DougPuchalski commented 11 years ago

I've installed lock-o-motion and MocRuby as git submodules as of today's date. Rake works fine until I add in the parslet gem.

git://github.com/kschiess/parslet.git

$ rake
     Build ./build/iPhoneSimulator-6.1-Development
rake aborted!
stack level too deep

https://gist.github.com/aceofspades/5252002

archan937 commented 11 years ago

Hi Doug,

I will look into it during the coming days. Please mind that LockOMotion and MocRuby are still in development. I am developing static libraries / C extensions support at the moment. I have put both on the roadmap.

Greets, Paul.

DougPuchalski commented 11 years ago

Hi Paul,

I am building a rather significant app, and could benefit from these greatly. I'm happy to help out if I can, please let me know.

One other concern is that I would not only want to use gems, but also point to local libraries in vendor or lib or whatever, I wasn't sure if you were supporting that. I realize it's in dev, I'm pointing at the repos and not the gems for this reason.

Extensions sounds very ambitious.

DougPuchalski commented 11 years ago

Looks like a circular dependency is being generated between parset/source/line_cache.rb and source.rb

DougPuchalski commented 11 years ago

The more I look at this, it seems it's an issue with RM's file_dependencies method in project/config.rb.

DougPuchalski commented 11 years ago

I have successfully compiled parslet after some hard-core debug work. It involves some changes to parslet itself and also to RubyMotion.

RubyMotion/lib/motion/project/config.rb: https://gist.github.com/aceofspades/5268201

Parslet modified for RubyMotion https://github.com/aceofspades/parslet/tree/rubymotion

MocRuby with strscan enabled: https://github.com/aceofspades/MocRuby/tree/dev

Minor for to lock-o-motion https://github.com/aceofspades/lock-o-motion/commit/775b8e7d916e2c5fa67fe33bf3e917faccda29c0

archan937 commented 11 years ago

Hi Doug,

I haven't managed to get Parslet working with the above as I keep getting this error :S

(main)> 2013-04-08 22:05:50.024 Just Awesome[37458:c07] uninitialized constant Parslet (NameError)
2013-04-08 22:05:50.027 Just Awesome[37458:c07] *** Terminating app due to uncaught exception 'NameError', reason: 'uninitialized constant Parslet (NameError)

Does it sound familiar?

DougPuchalski commented 11 years ago

Are you using https://github.com/aceofspades/parslet/tree/rubymotion ?

archan937 commented 11 years ago

Yes, I am.

DougPuchalski commented 11 years ago

Check out my working example here: https://github.com/aceofspades/parslet_test