protobuf-es
protobuf-es copied to clipboard
print diagnostics when a protoplugin fails to emit files.
When trying to publish a custom plugin to the BSR, I had some trouble figuring out why it was failing to generate an SDK.
I ended up debugging the problem by implementing a custom transpiler that prints extra diagnostic information when results are skipped, since these errors show up in the npm install log when it fails to generate.
So, this seems like it could be useful for others trying to debug SDK generation failures in the future.
This generates an error like:
protoc-gen-es-required: A problem occurred during transpilation and files were not generated.
Generating Files:
buf/validate/validate_required.ts
factory_execution/cycle_time/v1/cycle_time_required.ts
Diagnostics:
Property 'in' of exported interface has or is using private name 'Uint8Array'.
Property 'notIn' of exported interface has or is using private name 'Uint8Array'.
Property 'example' of exported interface has or is using private name 'Uint8Array'.