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

Go compiler cannot create code for maps with complex/binary keys

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Go - Compiler
    • None

    Description

      trying to generate code for ThriftTest leads to:

      ../../compiler/cpp/thrift --gen go ../ThriftTest.thrift 
      [WARNING:/tbHD/Home/nairboon/dev/thrift/test/ThriftTest.thrift:41] No generator named 'noexist' could be found!
      [WARNING:/tbHD/Home/nairboon/dev/thrift/test/ThriftTest.thrift:42] cpp generator does not accept 'noexist' as sub-namespace!
      Error: Cannot produce a valid type for a Go map key: map[int32]bool - aborting.

      the affected struct seems to be #3:

      struct CrazyNesting {
        1: string string_field,
        2: optional set<Insanity> set_field,
        3: required list< map<set<i32>,map<i32,set<list<map<Insanity,string>>>>>> list_field,
        4: binary binary_field
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nairboon Remo Hertig
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: