protobuf.js version: 7.1.2
The following proto files are defined here:
// 1.proto
syntax = "proto3";
package test;
import './11.proto';
import './12.proto';
// 11.proto
syntax = "proto3";
package test;
message TestMsg {
int32 id = 1;
}
// 12.proto
syntax = "proto3";
package test;
message TestMsg {
int32 id = 1;
int32 id = 1;
}
pbjs -t json -o 1.json 1.proto --sparse
The following error should be thrown in the correct case, but it is not actually displayed:
Error: duplicate name 'id' in Type TestMsg
After debugging, I think the cause of the problem may be here
|
function finish(err, root) { |
|
/* istanbul ignore if */ |
|
if (!callback) |
|
return; |
|
var cb = callback; |
|
callback = null; |
|
if (sync) |
|
throw err; |
|
cb(err, root); |
|
} |
Errors should be shown, not eaten silently, and we should fix it.
protobuf.js version: 7.1.2
The following proto files are defined here:
The following error should be thrown in the correct case, but it is not actually displayed:
After debugging, I think the cause of the problem may be here
protobuf.js/src/root.js
Lines 97 to 106 in d026849
Errors should be shown, not eaten silently, and we should fix it.