[ 
https://issues.apache.org/jira/browse/THRIFT-1651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13414824#comment-13414824
 ] 

Benjy Weinberger edited comment on THRIFT-1651 at 7/16/12 5:34 PM:
-------------------------------------------------------------------

The patch adds support for annotations on services, functions, senums, enums 
and enum values. It doesn't support annotations on senum values. Those are 
currently represented as strings, there is no 't_senum_value', so that would 
have been a bigger change than I wanted to make. 

The patch also adds a test for the parser - it just runs the thrift compiler 
over all the *.thrift files under test/ (except for BrokenConstants.thrift, 
which is not supposed to parse) and verifies that they parse, regardless of 
whether the generators produce anything useful from that parse.
                
      was (Author: benjyw):
    The patch adds support for annotations on enums and senums, and on enum 
values. It doesn't support annotations on senum values. Those are currently 
represented as strings, there is no 't_senum_value', so that would have been a 
bigger change than I wanted to make. 

The patch also adds a test for the parser - it just runs the thrift compiler 
over all the *.thrift files under test/ (except for BrokenConstants.thrift, 
which is not supposed to parse) and verifies that they parse, regardless of 
whether the generators produce anything useful from that parse.
                  
> Support annotations on all elements
> -----------------------------------
>
>                 Key: THRIFT-1651
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1651
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General)
>            Reporter: Benjy Weinberger
>            Priority: Minor
>              Labels: annotations, compiler, enum
>         Attachments: thrift-annotations-for-all.patch
>
>
> Custom annotations are currently supported on almost all types, but not on 
> enums (and their values), functions and services. This issue proposes to add 
> that support, so that all type definitions are uniform in this regard.
> This is useful, in particular, in custom code generation off thrift IDLs. For 
> example, we want to annotate each value in an enum with a "database name" so 
> we can match it with enum names in our database (which for various reasons 
> are not the same as the names of the enum values).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to