[Ironruby-core] IronRuby's Marshal.dump doesn't work with CLR types, or ruby types backed by a CLR type
orion.edwards at gmail.com
Mon Jul 9 10:28:28 UTC 2012
I personally haven't done any work on it since those last emails. I'm
away from work for the next week or so, so I can't go and look it up
>From my vague memories of the code, it shouldn't be much work to get
it marshalling .NET objects that use the .NET Serialization API's. I
had it working, I just needed to write extra code for .NET fundamental
types like Int64 which aren't handled.
Nonserializable .NET objects are much harder however (maybe impossible?).
I too was trying to get DRB to work, but the big issue with that is
that DRB uses ruby object id's to keep track of different objects on
both sides of the connection. CRuby has a special format for object
id's, and critically, you should never get duplicate object id's.
IronRuby's implementation of Object ID's on the other hand is very
basic, and it's quite easy to get duplicate object id's, (completely
ruining DRb). I'd start with that :-)
Certainly, if you get DRb working, I'd be a grateful user of it :-)
On Sat, Jul 7, 2012 at 4:16 AM, James W. <lists at ruby-forum.com> wrote:
> Orion et al.,
> I am curious if there has been any forward momentum on addressing CLR
> object serialization in IronRuby. I'm currently porting some JRuby test
> framework code that utilizes DRb as an interface to serialize Java
> objects for test automation. We'd like to be able to accomplish the same
> in Ironruby with CLR objects. Unfortunately, I am running into the above
> issue when DRb uses Marshal.load and Marshal.dump to serialize CLR (and
> CLR-backed) objects. Although there are many potential work-arounds, it
> seems that the ideal scenario would be for Ironruby to competently
> handle .NET family object serializations.
> Although I will be implementing a work-around in the short-term, I'd be
> interested in continuing this discussion. Any references you can provide
> would be exceptionally useful.
> Best regards,
> Posted via http://www.ruby-forum.com/.
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
More information about the Ironruby-core