Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend grpc option support. Allow default grpcbox GPB options to be overridden #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andymck
Copy link

@andymck andymck commented Feb 25, 2021

Change Summary

  1. Handle PB files in which introspection functions return props or maps

  2. 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.

@andymck andymck force-pushed the andymck/ts-master/enhanced-options-support branch from 0bb7de1 to 1c0cae2 Compare March 2, 2021 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant