You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Gary Mindlin Miguel (Jira)" <ji...@apache.org> on 2023/04/08 21:35:00 UTC
[jira] [Updated] (THRIFT-5697) Go generated code for enum uses int64, should be int32
[ https://issues.apache.org/jira/browse/THRIFT-5697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Mindlin Miguel updated THRIFT-5697:
----------------------------------------
Labels: Breaking-Change (was: )
> Go generated code for enum uses int64, should be int32
> ------------------------------------------------------
>
> Key: THRIFT-5697
> URL: https://issues.apache.org/jira/browse/THRIFT-5697
> Project: Thrift
> Issue Type: Improvement
> Components: Go - Compiler
> Reporter: Gary Mindlin Miguel
> Priority: Minor
> Labels: Breaking-Change
> Time Spent: 50m
> Remaining Estimate: 0h
>
> [The binary protocol specification says an enum is encoded as an int32|https://github.com/apache/thrift/blob/cb60265ec192a5c152d0ce6d4e4ce65633945073/doc/specs/thrift-binary-protocol.md?plain=1#L58].
>
> However the compiler generates an [int64 type|https://github.com/apache/thrift/blob/cb60265ec192a5c152d0ce6d4e4ce65633945073/compiler/cpp/src/thrift/generate/t_go_generator.cc#L786].
> This wastes memory and is also misleading.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)