protobuf.js
protobuf.js copied to clipboard
Missing import with loadSync is not thrown
protobuf.js version: 6.10.2
syntax = "proto3";
import "no/such/file.proto";
message Something {
ImportedType field = 1;
}
root.loadSync("missing-import.proto")
This should throw an error if "no/such/file.proto" does not exist but it does not.
This doesn't just apply to missing imports, this seems to apply for all syntax errors.
syntax = "proto3";
message Foo {
string name = 1;;
}
Whether or not this is an actual syntax error.. tbd. protoc is fine with it. Regardless, protobufjs silently swallows this but with the linked MR it's bubbled up correctly.
The issue is still present in v7.2.3 and the proposed fix works fine. Any hope this will be merged?