Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2232

IsSet* broken in Go

VotersStop watchingWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.2
    • Go - Compiler
    • Patch Available

    Description

      The various generated IsSetXYZ() methods just check for magic values of their respective fields. This is obviously broken, and also diverges from the implementation in other languages.

      I am willing and able to fix this myself, but I don't want to start on any impl until we can decide on an approach.

      At this point, though, optional fields in Go are basically useless if one's application makes use of the magic "absence" value.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jensg Jens Geyer
            bensigelman Ben Sigelman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment