PB_DUMP_REQUEST_BYTES=foo.bin protoc foo.proto --plugin=protoc-gen-gem=bin/protoc-gen-ruby --gem_out=.
will dump the raw proto request bytes generated by protoc for foo.proto to foo.bin
FUTURE USE CASE: functional tests to come that rely on checked-in bin files
PB_LOAD_REQUEST_BYTES=foo.bin bin/protoc-gen-ruby
will read the raw request bytes from foo.bin and print the generated
code (actually it is the code gen response proto, but it is still
readable) to STDOUT
CURRENT USE CASE: makes it so you can use pry when testing code generation. If you gave the code generator input from stdin, then pry would get the command to close at the end of the stdin input.
PB_DUMP_REQUEST_BYTES=foo.bin protoc foo.proto --plugin=protoc-gen-gem=bin/protoc-gen-ruby --gem_out=.
will dump the raw proto request bytes generated by protoc for foo.proto to foo.bin FUTURE USE CASE: functional tests to come that rely on checked-in bin filesPB_LOAD_REQUEST_BYTES=foo.bin bin/protoc-gen-ruby
will read the raw request bytes from foo.bin and print the generated code (actually it is the code gen response proto, but it is still readable) to STDOUT CURRENT USE CASE: makes it so you can usepry
when testing code generation. If you gave the code generator input from stdin, thenpry
would get the command to close at the end of the stdin input.