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

erlang: struct member name conflicts due to lowercased names

    XMLWordPrintableJSON

Details

    Description

      the erlang backend generates records to represent structs. instead of the unique sequential id they use the struct field name as the record keys. records in erlang do not support repeated keys so generated erlang modules do not compile

      the most obvious fix is to refuse to generate code from structs with repeated keys but this means the erlang backend is not capable of handling all valid structs

      the easiest fix is to switch structs to use the unique sequential ids as the keys of the record but this breaks backwards compatibility and probably necessitates generating helper functions to retrieve fields by name

      also possible is switching to an erlang data structure that supports repeated keys but this would also require breaking backwards compatibility

      Attachments

        Activity

          People

            alisdairsullivan alisdair sullivan
            alisdairsullivan alisdair sullivan
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: