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

nodejs - Error with enum generation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.2
    • Fix Version/s: 0.9.2
    • Component/s: Node.js - Compiler
    • Labels:
      None

      Description

      the issue is on node.js, an enum is generated like this:
      ttypes.TPolicy = {
      '1' : 'NO_SYNC',
      'NO_SYNC' : 1,
      '2' : 'SYNC',
      'SYNC' : 2,
      '3' : 'WRITE_NO_SYNC',
      'WRITE_NO_SYNC' : 3
      };

      correct is:
      ttypes.TPolicy = {
      'NO_SYNC' : 1,
      'SYNC' : 2,
      'WRITE_NO_SYNC' : 3
      };

      from the .thrift file:
      enum TPolicy
      {
      NO_SYNC = 1,
      SYNC = 2,
      WRITE_NO_SYNC = 3
      }

        Attachments

          Activity

            People

            • Assignee:
              roger Roger Meier
              Reporter:
              rodolfo Rodolfo Ochoa
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: