- Update
buf generate
so it populates the recently-addedsource_file_descriptors
field of theCodeGeneratorRequest
message. This provides the plugin with access to options that are configured to only be retained in source and not at runtime (via field option). Descriptors in theproto_file
field will not include any options configured this way for the files named infile_to_generate
field. - Add
--exclude-source-retention-options
flag tobuf build
, which causes options configured to only be retained in source to be stripped from the output descriptors.