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.

Reply via email to