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

Netstd generator produces uncompileable code for enums ending with "_result" or "_args"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.14.2
    • 0.15.0
    • netstd - Compiler
    • None

    Description

      When the .thrift files contains an enumeration whose name contains "_result", the generated code contains "Result" except in the definition of the enum itself, preventing the code from compiling successfully.

      Since other enumerations are generated preserving the case and underscores, I believe the issue lies on the usage side and not definition.

      Provided example (generated with netstd:no_deepcopy) shows the case where the enum in used as a return value but the issue is the same when used as parameter or inside a struct.

      I observed this issue with the current HEAD and checked that it already existed in 0.14.2.

      I will take a look and try to propose a patch.

      Attachments

        1. enum_result.tbz2
          3 kB
          Triton Circonflexe

        Issue Links

          Activity

            People

              jensg Jens Geyer
              Triton Triton Circonflexe
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m