Open DavidBruant opened 8 years ago
Oh good point. You up for sending a PR that validates this? :)
Sure.
Should it rather be fixed at the protocol-buffers-schema
level? Maybe as a validation function that comes after parsing, but before returning the schema?
I see other validation errors being thrown there ('Duplicate option ' + opt.name
, msg.name + ' does not declare ' + field.tag + ' as an extension number'
)?
Ah good point. Yes lets fix it there On Tue, 24 Nov 2015 at 15:48, David Bruant notifications@github.com wrote:
Sure. Should it rather be fixed at the protocol-buffers-schema level? Maybe as a validation function that comes after parsing, but before returning the schema? I see other validation errors being thrown there ('Duplicate option ' + opt.name, msg.name + ' does not declare ' + field.tag + ' as an extension number')?
— Reply to this email directly or view it on GitHub https://github.com/mafintosh/protocol-buffers/issues/49#issuecomment-159400677 .
source
We got bitten. Trying to do it ([packed=true] + non-primitive type). What ended up happening was the decoding call returning nonsensical objects.
The library should probably refuse such message descriptions with a corresponding warning.