Guys,

Success!  I now have a working version of jruby-debug gem.  What's more,
when I installed this in my JRuby gems directory I was then able to install
the standard ruby-debug gem, since it saw that I had a ruby-debug-base gem
already installed.  I was then able to run rdebug on a very simple ruby
script.  Also, I was able to do all this without  needing the line in
Ruby.java to load our library via build registerBuiltIn, since I added a
BasicLibraryService impl to do it via a require 'ruby_debug_base.jar'.  I
don't know about you guys, but I'm feeling like this approach is probably
the right way to go, as it seems the least intrusive to me.

Martin, is there any chance I could get commit rights to SVN so I can check
all this in and let other folks start playing with it?

--Chris

On 10/7/07, Chris Nelson <[EMAIL PROTECTED]> wrote:
>
> Peter and Martin,
>
> As far as BasicLibraryService, there are (I think) 2 approaches we could
> pursue to having our code replace the c ruby-debug code for folks running
> jruby.
>
> Right now, we're patching jruby to add Martin's library in a way so that
> code that does require 'ruby_debug.so' gets our libary.  This allows our
> code to work with the normal ruby-debug gems.  However, the way I got it to
> work is by installing the ruby-debug gems in MRI ruby and running jruby with
> GEM_HOME pointing at my MRI gems directory.  This is because doing a gem
> install ruby-debug-base will fail in jruby because it will try to compile
> the native c code.
>
> The other way to get this working is to make our own jruby version of
> ruby-debug-base which includes and requires in our jruby-debug.jar instead
> of ruby_debug.so.  This would mean our code would need to have an
> implementation of BasicLibraryService.  I'm definitely not a gems expert but
> I work with Jim Weirich (guy who wrote it) and if I'm understanding him
> correctly we should be able to have a java specific version of
> ruby-debug-base published alongside of the MRI version and when a user does
> a gem install ruby-debug-base they will be prompted to choose which version
> they want.  I'm not yet clear on all the details here so it may require some
> coordination with the ruby-debug guys but I'm guessing that won't be a
> problem.
>
> My thinking is this second way would be the most seemless user
> experience.  If someone has another way I'm not thinking of, please jump
> in.  For now I'm going to try to put together a jruby debug-base gem and see
> if I can get it to work locally.  I think it shouldn't be too hard (famous
> last words  :) ).
>
> --Chris
>
> On 10/3/07, Peter Brant <[EMAIL PROTECTED]> wrote:
> >
> > Hi Martin and Chris,
> >
> > I'd like to help out with jruby-debug too.  To avoid duplication of
> > effort, are there specific things you guys are working on?  Barring
> > that, I don't have much of a plan besides to poke around, see what
> > doesn't work, and fix it.
> >
> > First patch here http://jira.codehaus.org/browse/JRUBY-1286 (actually
> > a JRuby bug that was preventing exit in rdebug from working).
> >
> > Regarding BasicLibraryService, does this really help us?  We still
> > need to associate RubyDebugBaseLibrary with a specific name we can't
> > pick.  Or could jruby-debug be packaged as a JAR file and picked up
> > that way with the standard name?
> >
> > (for now, I did change the registerBuiltin() call in my copy to use
> > reflection so jruby_trunk and jruby-debug can be separate projects)
> >
> > Pete
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
>

Reply via email to