Hi, this isn't a question but I just wanted to leave this here in case it 
saves someone time in the future:

At first I couldn't figure out how to get complete upb code generation 
output.  I followed some "AI Overview" instructions which said to use 
protoc's upb_out flag (which wasn't documented explicitly in the command 
line help for protoc), but this resulted in a header "<protoname>.upb.h" 
which contained an include for "<protoname>.upb_minitable.h", and the 
second file was not generated.

However this header file had some essential information in the comments 
about how plugins work
https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/compiler/command_line_interface.h#L141

  // The compiler determines the executable name to search for by 
concatenating
  // exe_name_prefix with the unrecognized flag name, removing "_out".  So, 
for
  // example, if exe_name_prefix is "protoc-" and you pass the flag 
--foo_out,
  // the compiler will try to run the program "protoc-gen-foo"

The upb executables (on Windows) 
are protoc-gen-upb.exe, protoc-gen-upb_minitable.exe, and 
protoc-gen-upbdefs.exe, so I got working output with the command (with a 
subdirectory "upb_out" to receive the output)

./protoc.exe --upb_out=upb_out --upb_minitable_out=upb_out 
--upbdefs_out=upb_out myschema.proto


-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/protobuf/66b6f841-8297-485e-8078-e6f333aae200n%40googlegroups.com.

Reply via email to