You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by Rush Manbert <ru...@manbert.com> on 2014/05/14 18:27:02 UTC

Can anyone point me to the JIRA for this compiler feature?

Hi All,

I need to do something that uses both the latest and greatest Thrift compiler and our older version.

Our IDL files work with the latest compiler except when we try to set a default value for a struct member by specifying an enum value. With the old compiler you just used the enum's value name, like this:

struct foo
{
    n: int thisStructMember = MyEnumValue5,
}

while the newest compiler requires this:

struct foo
{
   n: int thisStructMember = MyEnumName.MyEnumValue5,
}

It seems like the straightest path to supporting both compiler versions would be to retrofit the syntax requirement of the newest compiler into our old version, then change our sources to comply. I suspect this would be easier for me if I could get my hands on the diff that applied the changes for the new syntax.

Can anyone point me at the JIRA incident for this change?

Thanks,
Rush


Re: Can anyone point me to the JIRA for this compiler feature?

Posted by Jens Geyer <je...@hotmail.com>.
Could you define "old" a bit more?
I found this https://issues.apache.org/jira/browse/THRIFT-1318

It's not exactly what you are looking for, but refers to 0.7 back in 2011 
and already has a testcase WITH the prefix.



-----Ursprüngliche Nachricht----- 
From: Rush Manbert
Sent: Wednesday, May 14, 2014 6:27 PM
To: dev@thrift.apache.org
Subject: Can anyone point me to the JIRA for this compiler feature?

Hi All,

I need to do something that uses both the latest and greatest Thrift 
compiler and our older version.

Our IDL files work with the latest compiler except when we try to set a 
default value for a struct member by specifying an enum value. With the old 
compiler you just used the enum's value name, like this:

struct foo
{
    n: int thisStructMember = MyEnumValue5,
}

while the newest compiler requires this:

struct foo
{
   n: int thisStructMember = MyEnumName.MyEnumValue5,
}

It seems like the straightest path to supporting both compiler versions 
would be to retrofit the syntax requirement of the newest compiler into our 
old version, then change our sources to comply. I suspect this would be 
easier for me if I could get my hands on the diff that applied the changes 
for the new syntax.

Can anyone point me at the JIRA incident for this change?

Thanks,
Rush