Closed geohuz closed 4 years ago
with the following proto file:
syntax = "proto3"; option java_package = "io.deepstream.protobuf"; enum TOPIC { UNKNOWN = 0; PARSER = 1; CONNECTION = 2; AUTH = 3; EVENT = 4; RECORD = 5; RPC = 6; PRESENCE = 7; MONITORING = 8; CLUSTER = 9; LOCK = 10; STATE_REGISTRY = 11; ERROR = 100; } message Message { TOPIC topic = 2; bytes message = 3; }
The generated nim file has the following code:
type TOPIC* {.pure.} = enum UNKNOWN = 0 PARSER = 1 CONNECTION = 2 AUTH = 3 EVENT = 4 RECORD = 5 RPC = 6 PRESENCE = 7 MONITORING = 8 CLUSTER = 9 LOCK = 10 STATE_REGISTRY = 11 ERROR = 100 Message* = ref MessageObj MessageObj* = object of Message topic: TOPIC message: seq[byte]
compile with error
Error: inheritance only works with non-final objects; to enable inheritance write 'Message of RootObj'
I guess it is conflicted with the nimpb's Message
It looks like that, yes. Do you have any proposals for nimpb how to get around this?
I manually changed protospec to avoid the conflict
with the following proto file:
The generated nim file has the following code:
compile with error
I guess it is conflicted with the nimpb's Message