Apache Thrift codegen doesn't compile with dmd v2.069.2. I'd like to help. Any tips on the syntax to fix this?
Lucas Burson via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jan 11 15:44:49 PST 2016
Hi,
I'm using Apache Thrift and using the tutorial to codegen D, but
the generated code doesn't compile with dmd v2.096.2. I submitted
Thrift defect [1] but I'd like to try to help fix the issue.
The code is very generic and I'm looking for tips on which lines
would need changed (or if you want to beat me to the fix, go
ahead, but share!).
The backtrace below hints that the code in [2] isn't liked by [3].
Should I focus on the mixin and does anything jump out?
[1] https://issues.apache.org/jira/browse/THRIFT-3541
[2]
https://github.com/apache/thrift/blob/0.9.3/lib/d/src/thrift/codegen/processor.d#L85
[3]
https://github.com/apache/thrift/blob/0.9.3/lib/d/src/thrift/internal/codegen.d#L246
Here's a snippet of the log:
[1m../../lib/d/src/thrift/codegen/processor.d-mixin-85(107):
[1;31mError: [mtemplate instance
thrift.codegen.processor.TArgsStruct!(Calculator, "ping") error
instantiating
[1m../../lib/d/src/thrift/codegen/processor.d-mixin-85(100):
[1;31m [minstantiated from here: process_ping!(TProtocol,
TProtocol)
[1mserver.d(101): [1;31m [minstantiated from here:
TServiceProcessor!(Calculator)
[1m../../lib/d/src/thrift/codegen/processor.d-mixin-85(130):
[1;31mError: [mtemplate instance
thrift.codegen.processor.TResultStruct!(Calculator, "ping") error
instantiating
[1m../../lib/d/src/thrift/codegen/processor.d-mixin-85(100):
[1;31m [minstantiated from here: process_ping!(TProtocol,
TProtocol)
[1mserver.d(101): [1;31m [minstantiated from here:
TServiceProcessor!(Calculator)
[1m../../lib/d/src/thrift/codegen/base.d(472): [1;31mError:
[minvalid foreach aggregate StaticFilter!(All, "key", "thrift",
"This", "isSetFlags", "fieldMeta", "set", "unset", "isSet",
"toString", "opEquals", "toHash", "thriftToStringImpl",
"thriftOpEqualsImpl", "thriftToHashImpl", "read", "write")
[1m../../lib/d/src/thrift/internal/codegen.d(272): [1;31mError:
[mtemplate instance
thrift.internal.codegen.Target!(TArgsStruct!(SharedService,
"getStruct"), "toHash") error instantiating
[1m../../lib/d/src/thrift/internal/codegen.d(361): [1;31m
[minstantiated from here: Template!"toHash"
[1m../../lib/d/src/thrift/internal/codegen.d(380): [1;31m
[minstantiated from here: Instantiate!(PApply, "toHash")
[1m../../lib/d/src/thrift/internal/codegen.d(361): [1;31m
[minstantiated from here: Template!"toHash"
[1m../../lib/d/src/thrift/internal/codegen.d(381): [1;31m
[m... (17 instantiations, -v to show)
More information about the Digitalmars-d
mailing list