[MacRuby] #989: external framework loading
#989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- when loading an external framework, if the full path is not specified, the framework loads but with missing methods and discrepancies: what works: {{{
framework 'ObjCHiredis.framework' => true redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x200232880> redis.connect("127.0.0.1", on:6379) => 1 }}}
what doesn't: {{{
framework 'ObjCHiredis' => true redis = ObjCHiredis.alloc.init => #<ObjCHiredis:0x2000fed40> redis.connect("127.0.0.1", on:6379) ArgumentError: wrong number of arguments (2 for 0) }}}
basic cocoa and foundation framework have no problem though -- Ticket URL: <http://www.macruby.org/trac/ticket/989> MacRuby <http://macruby.org/>
#989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lsansonetti@…): Where is ObjCHiredis.framework installed in this situation? #framework will pick up frameworks in ~/Library/Frameworks, /Library/Frameworks and /System/Library/Frameworks. If the ObjCHiredis.framework is copied in one of these locations, #framework should work as expected. -- Ticket URL: <http://www.macruby.org/trac/ticket/989#comment:1> MacRuby <http://macruby.org/>
#989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lsansonetti@…): From the list: my use case is one of TDD, where the framework is not installed but in the build folder. Even if I: ENV['DYLD_FRAMEWORK_PATH'] = ENV['BUILT_PRODUCTS_DIR'] the framework doesn't load properly. -- Ticket URL: <http://www.macruby.org/trac/ticket/989#comment:2> MacRuby <http://macruby.org/>
#989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lsansonetti@…): I grabbed the ObjCHiredis project from https://github.com/lp/ObjCHiredis, ran xcodebuild in the source directory, then did the following: {{{ $ cat t.rb framework "ObjCHiredis" p redis = ObjCHiredis.alloc.init p redis.connect("127.0.0.1", on:6379) $ DYLD_FRAMEWORK_PATH=build/Release /usr/local/bin/macruby t.rb #<ObjCHiredis:0x4004d5cc0> 2010-11-04 15:46:10.732 macruby[27012:607] Connection error: connect: Connection refused 0 }}} So, it seems to work for me. -- Ticket URL: <http://www.macruby.org/trac/ticket/989#comment:3> MacRuby <http://macruby.org/>
#989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lp@…): I must have something wrong in my system: DYLD_FRAMEWORK_PATH=build/Debug /usr/local/bin/macruby t.rb #<ObjCHiredis:0x2000d60c0> wrong number of arguments (2 for 0) (ArgumentError) and the DLYD_FRAMEWORK_PATH doesn't seem to change much in here: DYLD_FRAMEWORK_PATH=build/Anything /usr/local/bin/macruby t.rb #<ObjCHiredis:0x2000d65e0> wrong number of arguments (2 for 0) (ArgumentError) I'm running from the release 0.7, will try a nightly build and report back. -- Ticket URL: <http://www.macruby.org/trac/ticket/989#comment:4> MacRuby <http://macruby.org/>
#989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lp@…): with the latest nightly: {{{ $ DYLD_FRAMEWORK_PATH=build/Debug /usr/local/bin/macruby t.rb #<ObjCHiredis:0x2000d66c0> /Users/lpperron/Documents/lllaptop/git_repos/Redis/ObjCHiredis/ObjCHiredis/t.rb:3:in `<main>': wrong number of arguments (2 for 0) (ArgumentError) }}} I must have something wrong in my environment... build or execution? -- Ticket URL: <http://www.macruby.org/trac/ticket/989#comment:5> MacRuby <http://macruby.org/>
#989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lsansonetti@…): Could you verify that you don't have a bad version of ObjCHiredis.framework in the other locations? (~/Library/Frameworks, /Library/Frameworks and /System/Library/Frameworks) -- Ticket URL: <http://www.macruby.org/trac/ticket/989#comment:6> MacRuby <http://macruby.org/>
#989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lp@…): You're right Laurent! I had one in my local user Library... using it for a presentation I did about MacRuby at MTL.rb... Forgot to remove it and now it got in the way. Désolé du temps perdu, c'était mon erreur... Ça fonctionne maintenant. I think this ticket is closed. -- Ticket URL: <http://www.macruby.org/trac/ticket/989#comment:7> MacRuby <http://macruby.org/>
#989: external framework loading --------------------------------+------------------------------------------- Reporter: lp@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: framework external | --------------------------------+------------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => invalid Comment: Good to know that there is no bug in MacRuby :) -- Ticket URL: <http://www.macruby.org/trac/ticket/989#comment:8> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby