You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Alan Cabrera (Jira)" <ji...@apache.org> on 2021/04/28 17:18:00 UTC

[jira] [Commented] (THRIFT-5378) Generated Go enums' always appear to be in debuggers

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

Alan Cabrera commented on THRIFT-5378:
--------------------------------------

I realize that it's virtually the same.  When debugging Go code in Goland, the variables always appear to be {{<UNSET>}}.

> Generated Go enums' always appear to be <UNSET> in debuggers
> ------------------------------------------------------------
>
>                 Key: THRIFT-5378
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5378
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Go - Compiler
>            Reporter: Alan Cabrera
>            Priority: Minor
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Currently, the generated Go enums' {{String()}} method returns "<UNSET>", when its value is unknown, by the return statement at the end of the function.  For reasons unknown to me, this causes all enums in my debugger to have the value "<UNSET>", even though they do have a proper value.
> If I move the return statement up into a default case of the switch statement, everything seems to display perfectly in the debugger.  It's a simple enough fix and I will submit a patch today.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)