<JasonLunn[m]>
Apologies for the deck chair shuffling.
<headius>
Yeah I was wondering about that but no worries. I'll be at my desk shortly and we'll figure out a good work around
<headius>
Jason Lunn: I see the setBuiltin workaround got you past that point
<headius>
I will push a fix today for review that reduces isBuiltin to only methods defined during JRuby core boot
<JasonLunn[m]>
Yep - thanks for the think of that. I'm effectively unblocked.
<JasonLunn[m]>
headius: did you see my follow up emails re: grpc?
<headius>
it will continue to work with this change, and we'll see about deprecating isBuiltin and replacing with something more descriptive in JRuby X
<headius>
oh shoot I did not... I will look today
<JasonLunn[m]>
Still looking for good proxies for |JRuby| as a percentage of |Ruby|
<JasonLunn[m]>
Does it still matter whether or not definition of the respond_to? is a static method or not?
<headius>
it does... I am still not clear how it was called as an instance method, since you'd have to have an instance of a RespondTo in hand, but if you want to define it this way it should be static
<headius>
it could just be on the service as well, but perhaps in the real code there are other classes being set up there
<headius>
... on the service as a static method also
<headius>
it can only be an instance method if you are setting up a Ruby class that is specifically bound to a Java class that extends RubyObject or RubyBasicObject etc
<headius>
enebo: I will get those wip run fixes pushed shortly, just looking into a couple TCPSocket things that fail only in the full run
<headius>
addbin
<headius>
oops
<enebo[m]>
addbin
<enebo[m]>
ok
<JasonLunn[m]>
RespondTo does extend RubyObject...
<headius>
yes but you are not binding it as any Ruby class
<headius>
so you were setting up instance methods from RespondTo as methods on Bar, which is not a RespondTo
<JasonLunn[m]>
Maybe my example is just different enough from how protobuf does it that I'm tripping on this.
<JasonLunn[m]>
Our RubyMessage class has always defined its method_missing using a non-static method
<JasonLunn[m]>
so I thought I'd be able to define the respond_to? the same way
<headius>
probably because you have a RubyMessage class in JAva
<headius>
can you show me?
<JasonLunn[m]>
But perhaps the Foo::Bar example is not close enough to the lib to replicate that
<headius>
if you wanted to define "Bar" that way, you'd rename RespondTo to Bar and use its constructor as the allocator for the "Bar" Ruby class
<headius>
then you could use instance methods
<headius>
otherwise you are trying to use instance methods from the RespondTo class, and Bar is just being allocated as a RubyObject so it does not have those methods
<headius>
public class RubyMessage extends RubyObject
<headius>
I don't see where this class is being set up though
<headius>
the others all have initialization code to set up the Ruby side
<JasonLunn[m]>
Probably part of my problem in constructing a simple example. I'm probably missing an easier, simpler example where the BasicLibraryService of my example just loads an annotated class without defining an allocator
<JasonLunn[m]>
but I couldn't figure out how to do that so I stole the allocator example I had on hand
<headius>
the RubyMessage class is being set up there with an allocator to construct RubyMessage instances
<headius>
so whenever you have a RubyMessage instance in Ruby it is a RubyMessage in Java and so the instance methods are appropriate
<headius>
your example did not allocate RespondTo instances for Bar, so the instance methods could not be present on Bar
<headius>
not sure why this one piece of initialization is not homed with the class it defines, but that's it
<headius>
perhaps just to mimic the C code
<JasonLunn[m]>
Cool, I think I grok it better now.
<headius>
you can bind methods even if you don't set up a special class and allocator, but since they will not live on RubyObject they need to be static
<headius>
it's just binding function pointers into a method table, but when it eventually dispatches against the object they need to be there, or they need to be static and pass the object in