[
https://issues.apache.org/jira/browse/THRIFT-2063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16090880#comment-16090880
]
Davin Chia commented on THRIFT-2063:
------------------------------------
Ah sorry for the noise. I am definitely going to fix this. My intention on
opening discussion was to arrive at a community accepted solution. This is
because I am not a Go expert and so am not sure about the best solution. The
current monkey patch I am using is to convert all complex keys into strings,
which is definitely only temporary. I will get to this after tackling
*https://issues.apache.org/jira/browse/THRIFT-4253*.
> Go compiler cannot create code for maps with complex/binary keys
> ----------------------------------------------------------------
>
> Key: THRIFT-2063
> URL: https://issues.apache.org/jira/browse/THRIFT-2063
> Project: Thrift
> Issue Type: Bug
> Components: Go - Compiler
> Reporter: Remo Hertig
>
> trying to generate code for ThriftTest leads to:
> {code}
> ../../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.{code}
> the affected struct seems to be #3:
> {code}
> 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
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)