Extend grpc option support. Allow default grpcbox GPB options to be overridden #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
Handle PB files in which introspection functions return props or maps
Add support for the following grpc and gpb options:
proto_files: Allows an explicit list of protos to be specified and used for PB and service behaviour generation, rather than defaulting to all protos in the directory specified by the "protos" option. If proto_files is not specified then defaults to using "protos"
beam_out_dir: allows an explicit directory to be specified to where the beams including PBs and service behaviours will be outputted. Defaults to existing location as per rebar_app_info:ebin_dir(AppInfo)
keep_beams: the plugin builds the beams for the various proto modules and outputs to the 'ebin_dir'.
If this flag is set to true, these beams will be deleted after generation of the services. This is useful for example if the application wishes to generate erl files only and build all as part of the application build process. Defaults to false
create_services: boolean flag to determine whether or not to generate service behaviours. Prob an odd option given services generation is the key functionality here but our use case is that we want to generate the encoder/decoders once and use on a non grpcbox client. This client only requires the PB file. Defaults to false.
override_gpb_defaults: plugin enforces a number of default GPB options as part of gpb_compile. For example it is currently enforcing the 'maps' options. This field allows the default options to be dropped and have the plugin use only those options supplied by the calling service via the gpb_opts config. Defaults to false.