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

THRIFT-242 is incompatible with arguments with empty key fields

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.1
    • None
    • Python - Compiler
    • None
    • Patch Available

    Description

      Esteve's last change to how default values are stored broke stuff. Here is a quick example:

      {{
      service Test

      { bool get_slice(i32 start = -1), } }}

      generates

      {{
      class get_slice_args:

      thrift_spec = None
      def _init_(self, start=thrift_spec[-1][4],):
      self.start = start
      }}

      which is obviously invalid.

      I'm not sure how thrift_spec is supposed to be populated here so I'm unsure how to fix this.

      Attachments

        1. default+neg-field-2.diff
          9 kB
          Alexander Shigin
        2. default+neg-field.diff
          13 kB
          Alexander Shigin
        3. thrift-python-defaults-v2.patch
          3 kB
          Alexander Shigin
        4. thrift-python-defaults.patch
          3 kB
          Alexander Shigin
        5. thrift-339-6.patch
          9 kB
          Esteve Fernandez
        6. thrift-339-5.patch
          7 kB
          Esteve Fernandez
        7. thrift-339-4.patch
          7 kB
          Esteve Fernandez
        8. thrift-339-3.patch
          7 kB
          Esteve Fernandez
        9. thrift-339-2.patch
          3 kB
          Esteve Fernandez
        10. thrift-339.patch
          3 kB
          Esteve Fernandez

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jbellis Jonathan Ellis
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: