You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2008/12/30 18:27:44 UTC

[jira] Created: (THRIFT-245) FIELDS constant should contain name of enumerated type for enum fields

FIELDS constant should contain name of enumerated type for enum fields
----------------------------------------------------------------------

                 Key: THRIFT-245
                 URL: https://issues.apache.org/jira/browse/THRIFT-245
             Project: Thrift
          Issue Type: Improvement
          Components: Compiler (Ruby)
            Reporter: Bryan Duxbury
            Priority: Trivial


When a Ruby struct is generated, if the struct has fields that are of enumerated types, it is converted into an i32 field, and no trace of the enumerated type is recorded. I propose we add a new key to the FIELDS entries, :enum_class, that contains the class constant for the enumerated type. This way, you can reflectively determine both that the field is of an enumerated type and which type it is. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (THRIFT-245) FIELDS constant should contain name of enumerated type for enum fields

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury resolved THRIFT-245.
----------------------------------

    Resolution: Fixed

Committed.

> FIELDS constant should contain name of enumerated type for enum fields
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-245
>                 URL: https://issues.apache.org/jira/browse/THRIFT-245
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: thrift-245.patch
>
>
> When a Ruby struct is generated, if the struct has fields that are of enumerated types, it is converted into an i32 field, and no trace of the enumerated type is recorded. I propose we add a new key to the FIELDS entries, :enum_class, that contains the class constant for the enumerated type. This way, you can reflectively determine both that the field is of an enumerated type and which type it is. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-245) FIELDS constant should contain name of enumerated type for enum fields

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury updated THRIFT-245:
---------------------------------

    Attachment: thrift-245.patch

This patch adds the :enum_class key to FIELDS entries that are enums.

> FIELDS constant should contain name of enumerated type for enum fields
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-245
>                 URL: https://issues.apache.org/jira/browse/THRIFT-245
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Bryan Duxbury
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: thrift-245.patch
>
>
> When a Ruby struct is generated, if the struct has fields that are of enumerated types, it is converted into an i32 field, and no trace of the enumerated type is recorded. I propose we add a new key to the FIELDS entries, :enum_class, that contains the class constant for the enumerated type. This way, you can reflectively determine both that the field is of an enumerated type and which type it is. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-245) FIELDS constant should contain name of enumerated type for enum fields

Posted by "Kevin Clark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683692#action_12683692 ] 

Kevin Clark commented on THRIFT-245:
------------------------------------

Looks good, push it.

> FIELDS constant should contain name of enumerated type for enum fields
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-245
>                 URL: https://issues.apache.org/jira/browse/THRIFT-245
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: thrift-245.patch
>
>
> When a Ruby struct is generated, if the struct has fields that are of enumerated types, it is converted into an i32 field, and no trace of the enumerated type is recorded. I propose we add a new key to the FIELDS entries, :enum_class, that contains the class constant for the enumerated type. This way, you can reflectively determine both that the field is of an enumerated type and which type it is. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-245) FIELDS constant should contain name of enumerated type for enum fields

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury updated THRIFT-245:
---------------------------------

    Fix Version/s: 0.1

> FIELDS constant should contain name of enumerated type for enum fields
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-245
>                 URL: https://issues.apache.org/jira/browse/THRIFT-245
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Bryan Duxbury
>            Priority: Trivial
>             Fix For: 0.1
>
>
> When a Ruby struct is generated, if the struct has fields that are of enumerated types, it is converted into an i32 field, and no trace of the enumerated type is recorded. I propose we add a new key to the FIELDS entries, :enum_class, that contains the class constant for the enumerated type. This way, you can reflectively determine both that the field is of an enumerated type and which type it is. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-245) FIELDS constant should contain name of enumerated type for enum fields

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury updated THRIFT-245:
---------------------------------

      Assignee: Bryan Duxbury
    Patch Info: [Patch Available]

> FIELDS constant should contain name of enumerated type for enum fields
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-245
>                 URL: https://issues.apache.org/jira/browse/THRIFT-245
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: thrift-245.patch
>
>
> When a Ruby struct is generated, if the struct has fields that are of enumerated types, it is converted into an i32 field, and no trace of the enumerated type is recorded. I propose we add a new key to the FIELDS entries, :enum_class, that contains the class constant for the enumerated type. This way, you can reflectively determine both that the field is of an enumerated type and which type it is. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (THRIFT-245) FIELDS constant should contain name of enumerated type for enum fields

Posted by "Kevin Clark (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Clark closed THRIFT-245.
------------------------------


> FIELDS constant should contain name of enumerated type for enum fields
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-245
>                 URL: https://issues.apache.org/jira/browse/THRIFT-245
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: thrift-245.patch
>
>
> When a Ruby struct is generated, if the struct has fields that are of enumerated types, it is converted into an i32 field, and no trace of the enumerated type is recorded. I propose we add a new key to the FIELDS entries, :enum_class, that contains the class constant for the enumerated type. This way, you can reflectively determine both that the field is of an enumerated type and which type it is. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-245) FIELDS constant should contain name of enumerated type for enum fields

Posted by "Kevin Clark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670060#action_12670060 ] 

Kevin Clark commented on THRIFT-245:
------------------------------------

+1

> FIELDS constant should contain name of enumerated type for enum fields
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-245
>                 URL: https://issues.apache.org/jira/browse/THRIFT-245
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Bryan Duxbury
>            Priority: Trivial
>             Fix For: 0.1
>
>
> When a Ruby struct is generated, if the struct has fields that are of enumerated types, it is converted into an i32 field, and no trace of the enumerated type is recorded. I propose we add a new key to the FIELDS entries, :enum_class, that contains the class constant for the enumerated type. This way, you can reflectively determine both that the field is of an enumerated type and which type it is. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.