Archived

This forum has been archived. Please start a new discussion on GitHub.

Patch for slice2as

We started testing Ice for ActionScript 1.0beta and found out that slice2as doesn't generate all necessary imports for classes with operations that derive those operations from other classes or interfaces. Here is the patch for Gen.cpp from slice2as sources.

Usage
cd slice2as-1.0b/cpp/src/slice2as
patch Gen.cpp Gen.cpp.patch.txt
cd ../../ && make

Attachment not found.

Comments

  • mes
    mes California
    Hi Sergei,

    Many thanks for the patch.

    Aside from this issue, has Ice for ActionScript been working OK for you?

    Regards,
    Mark
  • Hi Mark,

    We have found another issue in Ice runtime for ActionScript. When we create a servant on the action script side, register it with adapter and pass it through Glacier2 router to another server, any calls to the servant fail with ObjectNotExists. It happens only with the first servant created (all next servants are registered and work ok). We found a very strange workaround (didn't have time to delve into Ice runtime sources) - if we call ice_ping locally right after registering the servant with adapter, everything works fine.

    Apart from that we are very happy with Ice for ActionScript. The performance is great (don't have any metrics yet, but it's obviously faster and much more convenient than the framework we've been using).
  • mes
    mes California
    sfedorov wrote: »
    We have found another issue in Ice runtime for ActionScript. When we create a servant on the action script side, register it with adapter and pass it through Glacier2 router to another server, any calls to the servant fail with ObjectNotExists. It happens only with the first servant created (all next servants are registered and work ok). We found a very strange workaround (didn't have time to delve into Ice runtime sources) - if we call ice_ping locally right after registering the servant with adapter, everything works fine.
    That's strange. The "chat" demo that we include in the Ice for ActionScript distribution uses Glacier2 and we didn't notice any problems. Do you have a test case?
    Apart from that we are very happy with Ice for ActionScript. The performance is great (don't have any metrics yet, but it's obviously faster and much more convenient than the framework we've been using).
    Glad to hear it!

    Regards,
    Mark
  • mes
    mes California
    mes wrote: »
    That's strange. The "chat" demo that we include in the Ice for ActionScript distribution uses Glacier2 and we didn't notice any problems. Do you have a test case?
    Actually, I'm able to reproduce this behavior now, so I don't need a test case.

    Mark
  • mes
    mes California
    mes wrote: »
    Actually, I'm able to reproduce this behavior now, so I don't need a test case.
    Sorry, the ObjectNotExistException was due to a bug in my test case and not in Ice. I'm unable to reproduce the behavior you described, so if you can provide a small test case I'd be happy to review it.

    Regards,
    Mark
  • Hello Mark,

    Actually we cannot provide the test case right now, as the problem started to persist when the project growed considerably. Before that everything worked fine just as in your demo. I can provide you with access to our svn repository if you wish.

    And here is another patch for slice2as (this one is cumulative, it includes previous patch). It fixes the issue that slice2as doesn't generate "override" keyword for functions that are derived by a class from an interface through another class (AInterface:: op <- Base <- Derived, in this situation there were no override keyword for "op" in Derived).

    Attachment not found.
  • mes
    mes California
    sfedorov wrote: »
    And here is another patch for slice2as (this one is cumulative, it includes previous patch). It fixes the issue that slice2as doesn't generate "override" keyword for functions that are derived by a class from an interface through another class (AInterface:: op <- Base <- Derived, in this situation there were no override keyword for "op" in Derived).
    Good catch. In fact, the method does not need to be defined at all in Derived because it inherits the "dummy" implementation from Base.

    Thanks,
    Mark