[
https://issues.apache.org/jira/browse/THRIFT-352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary Tsang updated THRIFT-352:
------------------------------
Description:
Currently only explicitly set enum values are added to the ValidValues set.
This makes thrift interfaces like scribe fail
Example:
{code}
#scribe thrift interface
enum ResultCode
{
OK,
TRY_LATER
}
# generated ruby code
module ResultCode
OK = 0
TRY_LATER = 1
VALID_VALUES = Set.new([]).freeze
end
{code}
My patch removes the check to see if the value was explicilty set, so all
enumerated types get added to the ValidValues set.
was:
Currently only explicitly set enum values are added to the ValidValues set.
This makes thrift interfaces like scribe fail
Example:
{quote}
#scribe thrift interface
enum ResultCode
{
OK,
TRY_LATER
}
# generated ruby code
module ResultCode
OK = 0
TRY_LATER = 1
VALID_VALUES = Set.new([]).freeze
end
{quote}
My patch removes the check to see if the value was explicilty set, so all
enumerated types get added to the ValidValues set.
> Implicit Enum Values should still be valid.
> -------------------------------------------
>
> Key: THRIFT-352
> URL: https://issues.apache.org/jira/browse/THRIFT-352
> Project: Thrift
> Issue Type: Bug
> Components: Compiler (Ruby)
> Reporter: Gary Tsang
>
> Currently only explicitly set enum values are added to the ValidValues set.
> This makes thrift interfaces like scribe fail
> Example:
> {code}
> #scribe thrift interface
> enum ResultCode
> {
> OK,
> TRY_LATER
> }
> # generated ruby code
> module ResultCode
> OK = 0
> TRY_LATER = 1
> VALID_VALUES = Set.new([]).freeze
> end
> {code}
> My patch removes the check to see if the value was explicilty set, so all
> enumerated types get added to the ValidValues set.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.