You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Steve Huston <sh...@riverace.com> on 2008/05/03 00:26:48 UTC

Rubygen stuff has double content on Windows.... Huh?

Hi,
I'm working on the Windows build and adding the rubygen piece at the
start of the common build. It's running ruby and generating lots of
stuff, but the immediate issue I'm facing is that the generated
qpid/framing/constants.h file has duplicates for lots of things... For
example:

namespace qpid {
namespace framing {

enum AmqpConstant {
    MIN_MAX_FRAME_SIZE=4096,
    MIN_MAX_FRAME_SIZE=4096,
    CONNECTION_CLASS_ID=0x1,
    CONNECTION_START_METHOD_ID=0x1,
...
    STREAM_PUBLISH_METHOD_ID=0x6,
    STREAM_RETURN_METHOD_ID=0x7,
    STREAM_DELIVER_METHOD_ID=0x8,
    CONNECTION_CLASS_ID=0x1,
    CONNECTION_START_METHOD_ID=0x1,

I tried the build on Linux on a clean svn checkout and, of course,
it's fine.

I've never tried to read Ruby code before today... Does anyone know
what may be going on here? The Ruby on Windows is 1.8.6 from
http://www.ruby-lang.org/en/downloads/ and the Ruby on Linux is ruby
1.8.1 (2003-12-25) [i386-linux-gnu]

-Steve



Re: Rubygen stuff has double content on Windows.... Huh?

Posted by Danushka Menikkumbura <da...@wso2.com>.
Hi Steve,
    I think this has something to do with the Ruby version. We had 
another code gen issue related to Ruby version. In that case 1.8.6.114 
was working fine but not 1.8.6.111.

Danushka

Steve Huston wrote:
> Hi,
> I'm working on the Windows build and adding the rubygen piece at the
> start of the common build. It's running ruby and generating lots of
> stuff, but the immediate issue I'm facing is that the generated
> qpid/framing/constants.h file has duplicates for lots of things... For
> example:
>
> namespace qpid {
> namespace framing {
>
> enum AmqpConstant {
>     MIN_MAX_FRAME_SIZE=4096,
>     MIN_MAX_FRAME_SIZE=4096,
>     CONNECTION_CLASS_ID=0x1,
>     CONNECTION_START_METHOD_ID=0x1,
> ...
>     STREAM_PUBLISH_METHOD_ID=0x6,
>     STREAM_RETURN_METHOD_ID=0x7,
>     STREAM_DELIVER_METHOD_ID=0x8,
>     CONNECTION_CLASS_ID=0x1,
>     CONNECTION_START_METHOD_ID=0x1,
>
> I tried the build on Linux on a clean svn checkout and, of course,
> it's fine.
>
> I've never tried to read Ruby code before today... Does anyone know
> what may be going on here? The Ruby on Windows is 1.8.6 from
> http://www.ruby-lang.org/en/downloads/ and the Ruby on Linux is ruby
> 1.8.1 (2003-12-25) [i386-linux-gnu]
>
> -Steve
>
>
>
>
>   



Re: Rubygen stuff has double content on Windows.... Huh?

Posted by Senaka Fernando <se...@gmail.com>.
On Tue, May 6, 2008 at 8:35 PM, Steve Huston <sh...@riverace.com> wrote:

> Update on ruby generating things on Windows...
>
> > > Danushka Menikkumbura wrote:
> > > > This is exactly the same behavior of the code generator
> > > that we were
> > > > experiencing with Ruby 1.8.6.111.
> > >
> > > Indeed. Steve, are you able to update the version of ruby you have
> > on
> > > windows? 1.8.6.114 fixed this on linux.
>
> Updated to 1.8.6.p114, and things are good.
>
> Cookin' with gas now...


Great news. Well what I'm wondering is, is it us or is it Ruby...

Regards,
Senaka


>
>
> Thanks,
> -Steve
>
>
>

RE: Rubygen stuff has double content on Windows.... Huh?

Posted by Steve Huston <sh...@riverace.com>.
> > Updated to 1.8.6.p114, and things are good.
> >
> > Cookin' with gas now...
> >
> >   
> Thats great. But we need to dig in an see where and why it
misbehaves.

I agree that's a good idea. But I don't know how to read Ruby, even
less about its internals. I can't justify the time it would take me to
research this, but I'd be happy to run tests, etc. if someone else
does.

-Steve



Re: Rubygen stuff has double content on Windows.... Huh?

Posted by Danushka Menikkumbura <da...@wso2.com>.
Steve Huston wrote:
> Update on ruby generating things on Windows...
>
>   
>>> Danushka Menikkumbura wrote:
>>>       
>>>> This is exactly the same behavior of the code generator 
>>>>         
>>> that we were 
>>>       
>>>> experiencing with Ruby 1.8.6.111.
>>>>         
>>> Indeed. Steve, are you able to update the version of ruby you have
>>>       
>> on 
>>     
>>> windows? 1.8.6.114 fixed this on linux.
>>>       
>
> Updated to 1.8.6.p114, and things are good.
>
> Cookin' with gas now...
>
>   
Thats great. But we need to dig in an see where and why it misbehaves.

Danushka
> Thanks,
> -Steve
>
>
>
>
>   



RE: Rubygen stuff has double content on Windows.... Huh?

Posted by Steve Huston <sh...@riverace.com>.
Update on ruby generating things on Windows...

> > Danushka Menikkumbura wrote:
> > > This is exactly the same behavior of the code generator 
> > that we were 
> > > experiencing with Ruby 1.8.6.111.
> > 
> > Indeed. Steve, are you able to update the version of ruby you have
> on 
> > windows? 1.8.6.114 fixed this on linux.

Updated to 1.8.6.p114, and things are good.

Cookin' with gas now...

Thanks,
-Steve



RE: Rubygen stuff has double content on Windows.... Huh?

Posted by Steve Huston <sh...@riverace.com>.
Ok, at least I know it's Ruby and not the build... I will check into
updating Ruby on Windows.

Thanks!

-Steve

> -----Original Message-----
> From: Gordon Sim [mailto:gsim@redhat.com] 
> Sent: Monday, May 05, 2008 7:28 AM
> To: qpid-dev@incubator.apache.org
> Subject: Re: Rubygen stuff has double content on Windows.... Huh?
> 
> 
> Danushka Menikkumbura wrote:
> > This is exactly the same behavior of the code generator 
> that we were 
> > experiencing with Ruby 1.8.6.111.
> 
> Indeed. Steve, are you able to update the version of ruby you have
on 
> windows? 1.8.6.114 fixed this on linux.
> 



Re: Rubygen stuff has double content on Windows.... Huh?

Posted by Gordon Sim <gs...@redhat.com>.
Danushka Menikkumbura wrote:
> This is exactly the same behavior of the code generator that we were 
> experiencing with Ruby 1.8.6.111.

Indeed. Steve, are you able to update the version of ruby you have on 
windows? 1.8.6.114 fixed this on linux.

Re: Rubygen stuff has double content on Windows.... Huh?

Posted by Danushka Menikkumbura <da...@wso2.com>.
Steve Huston wrote:
> Hi Gordon,
>
> --
> Steve Huston, Riverace Corporation
> Want to take ACE training on YOUR schedule?
> See http://www.riverace.com/training.htm
>
>
>   
>> -----Original Message-----
>> From: Gordon Sim [mailto:gsim@redhat.com] 
>> Sent: Monday, May 05, 2008 3:04 AM
>> To: qpid-dev@incubator.apache.org
>> Subject: Re: Rubygen stuff has double content on Windows.... Huh?
>>
>>
>> Steve Huston wrote:
>>     
>>> Hi,
>>> I'm working on the Windows build and adding the rubygen piece at
>>>       
> the
>   
>>> start of the common build. It's running ruby and generating lots
>>>       
> of
>   
>>> stuff, but the immediate issue I'm facing is that the generated
>>> qpid/framing/constants.h file has duplicates for lots of 
>>>       
>> things... For
>>     
>>> example:
>>>
>>> namespace qpid {
>>> namespace framing {
>>>
>>> enum AmqpConstant {
>>>     MIN_MAX_FRAME_SIZE=4096,
>>>     MIN_MAX_FRAME_SIZE=4096,
>>>     CONNECTION_CLASS_ID=0x1,
>>>     CONNECTION_START_METHOD_ID=0x1,
>>> ...
>>>     STREAM_PUBLISH_METHOD_ID=0x6,
>>>     STREAM_RETURN_METHOD_ID=0x7,
>>>     STREAM_DELIVER_METHOD_ID=0x8,
>>>     CONNECTION_CLASS_ID=0x1,
>>>     CONNECTION_START_METHOD_ID=0x1,
>>>
>>> I tried the build on Linux on a clean svn checkout and, of course,
>>> it's fine.
>>>
>>> I've never tried to read Ruby code before today... Does anyone
>>>       
> know
>   
>>> what may be going on here? 
>>>       
>> That code is generated by rubygen/framing.0-10/constants.rb. From
>>     
> the 
>   
>> look of things, either something funny is happening with the 
>> concatenation (e.g. l.concat @amqp.constants.map { |c| 
>> "#{c.name.shout}=#{c.value}" }) or during loading of the spec 
>> duplicate 
>> objects are created for some reason...
>>
>> If you look at e.g. AMQP_ServerOperations.h, are there duplicate 
>> definitions of the ConnectionHandler class? That would 
>> indicate whether 
>> the issue is specific to the constants template or more widespread.
>>     
>
> There's no definition of ConnectionHandler there... Aside from
> comments and #includes, this is the contents of
> AMQP_ServerOperations.h:
>
> namespace qpid {
> namespace framing {
>
> class AMQMethodBody;
>
> class AMQP_ServerOperations {
>   public:
>     class Invoker;              // Declared in ServerInvoker
>
>     virtual ~AMQP_ServerOperations() {}
>
>     virtual ProtocolVersion getVersion() const = 0;
>
>     // Inner classes
>
>     // Method handler get methods
>
> }; /* class AMQP_ServerOperations */
> }}
>  
>   
This is exactly the same behavior of the code generator that we were 
experiencing with Ruby 1.8.6.111.

Danushka
>
>
>
>   



RE: Rubygen stuff has double content on Windows.... Huh?

Posted by Steve Huston <sh...@riverace.com>.
Hi Gordon,

--
Steve Huston, Riverace Corporation
Want to take ACE training on YOUR schedule?
See http://www.riverace.com/training.htm


> -----Original Message-----
> From: Gordon Sim [mailto:gsim@redhat.com] 
> Sent: Monday, May 05, 2008 3:04 AM
> To: qpid-dev@incubator.apache.org
> Subject: Re: Rubygen stuff has double content on Windows.... Huh?
> 
> 
> Steve Huston wrote:
> > Hi,
> > I'm working on the Windows build and adding the rubygen piece at
the
> > start of the common build. It's running ruby and generating lots
of
> > stuff, but the immediate issue I'm facing is that the generated
> > qpid/framing/constants.h file has duplicates for lots of 
> things... For
> > example:
> > 
> > namespace qpid {
> > namespace framing {
> > 
> > enum AmqpConstant {
> >     MIN_MAX_FRAME_SIZE=4096,
> >     MIN_MAX_FRAME_SIZE=4096,
> >     CONNECTION_CLASS_ID=0x1,
> >     CONNECTION_START_METHOD_ID=0x1,
> > ...
> >     STREAM_PUBLISH_METHOD_ID=0x6,
> >     STREAM_RETURN_METHOD_ID=0x7,
> >     STREAM_DELIVER_METHOD_ID=0x8,
> >     CONNECTION_CLASS_ID=0x1,
> >     CONNECTION_START_METHOD_ID=0x1,
> > 
> > I tried the build on Linux on a clean svn checkout and, of course,
> > it's fine.
> > 
> > I've never tried to read Ruby code before today... Does anyone
know
> > what may be going on here? 
> 
> That code is generated by rubygen/framing.0-10/constants.rb. From
the 
> look of things, either something funny is happening with the 
> concatenation (e.g. l.concat @amqp.constants.map { |c| 
> "#{c.name.shout}=#{c.value}" }) or during loading of the spec 
> duplicate 
> objects are created for some reason...
> 
> If you look at e.g. AMQP_ServerOperations.h, are there duplicate 
> definitions of the ConnectionHandler class? That would 
> indicate whether 
> the issue is specific to the constants template or more widespread.

There's no definition of ConnectionHandler there... Aside from
comments and #includes, this is the contents of
AMQP_ServerOperations.h:

namespace qpid {
namespace framing {

class AMQMethodBody;

class AMQP_ServerOperations {
  public:
    class Invoker;              // Declared in ServerInvoker

    virtual ~AMQP_ServerOperations() {}

    virtual ProtocolVersion getVersion() const = 0;

    // Inner classes

    // Method handler get methods

}; /* class AMQP_ServerOperations */
}}
 



Re: Rubygen stuff has double content on Windows.... Huh?

Posted by Gordon Sim <gs...@redhat.com>.
Steve Huston wrote:
> Hi,
> I'm working on the Windows build and adding the rubygen piece at the
> start of the common build. It's running ruby and generating lots of
> stuff, but the immediate issue I'm facing is that the generated
> qpid/framing/constants.h file has duplicates for lots of things... For
> example:
> 
> namespace qpid {
> namespace framing {
> 
> enum AmqpConstant {
>     MIN_MAX_FRAME_SIZE=4096,
>     MIN_MAX_FRAME_SIZE=4096,
>     CONNECTION_CLASS_ID=0x1,
>     CONNECTION_START_METHOD_ID=0x1,
> ...
>     STREAM_PUBLISH_METHOD_ID=0x6,
>     STREAM_RETURN_METHOD_ID=0x7,
>     STREAM_DELIVER_METHOD_ID=0x8,
>     CONNECTION_CLASS_ID=0x1,
>     CONNECTION_START_METHOD_ID=0x1,
> 
> I tried the build on Linux on a clean svn checkout and, of course,
> it's fine.
> 
> I've never tried to read Ruby code before today... Does anyone know
> what may be going on here? 

That code is generated by rubygen/framing.0-10/constants.rb. From the 
look of things, either something funny is happening with the 
concatenation (e.g. l.concat @amqp.constants.map { |c| 
"#{c.name.shout}=#{c.value}" }) or during loading of the spec duplicate 
objects are created for some reason...

If you look at e.g. AMQP_ServerOperations.h, are there duplicate 
definitions of the ConnectionHandler class? That would indicate whether 
the issue is specific to the constants template or more widespread.