In CockroachDB we have some protos in the util package, but the protobufjs generated code trips on this and generates code like this:
UnresolvedAddr.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cockroach.$util.UnresolvedAddr();
while (reader.pos < end) {
let tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.network_field = reader.string();
break;
case 2:
message.address_field = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
Note that $root.cockroach.$util should be $root.cockroach.util.
In CockroachDB we have some protos in the
utilpackage, but the protobufjs generated code trips on this and generates code like this:Note that
$root.cockroach.$utilshould be$root.cockroach.util.