You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Aleksey Pesternikov (JIRA)" <ji...@apache.org> on 2013/11/04 18:11:17 UTC
[jira] [Commented] (THRIFT-2063) Go compiler cannot create code for
maps with a map as key
[ https://issues.apache.org/jira/browse/THRIFT-2063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13813015#comment-13813015 ]
Aleksey Pesternikov commented on THRIFT-2063:
---------------------------------------------
Cassandra and Hbase interfaces would compile and work if binary keys are implemented as strings (actually working in this fork https://github.com/apesternikov/thrift4go).
Implementing custom keys (as in https://github.com/pomack/thrift4go) makes the code non-typesafe, much less efficient and produces unreadable interface.
> Go compiler cannot create code for maps with a map as key
> ---------------------------------------------------------
>
> 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.1#6144)