-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allow to configure source and output paths #134
Comments
@doron-cohen I really want to discuss all of the great issues you raised here but I feel it will be more appropriate to break this issue into multiple issues so we can have contextual discussion. Sounds good? |
Yes no problems at all. |
Let's focus on the |
I personally like the idea of a configuration file. I imagine a source_dir="src"
materialized_config_dir="configuration"
# more configurations in the future? That way it all protoconf invocations will know where to look for the files. |
Yes, a workspace level config file is something I was intended to put for a long time and make the I am not sure it will be a wise idea to allow the value to be On a different note, I am still trying to wrap my head around what format this workspace configuration file should be. I am trying to advocate at tool that uses a specific configuration method, so it feels awkward to me to use toml/json/yaml for this configuration file, however using The config format will be json, defined by a |
I understand how you feel. Using JSON might be weird while building this machine but if these two parameters I listed are the only ones for now I think it's an overkill. I do like TOML as it has a good balance between readability and type safety. |
@doron-cohen, regarding this:
I should probably make this easier, but I just figure out a way to do so, even with current release:
|
I noticed that some paths and suffixes are hardcoded.
First, the required
src
dir which I didn't see any convention about it while reading aboutprotobuf
. Actually, I didn't see any convention anywhere. Right now I am using protoconf with Buf which looks very popular. My directory structure looks like this:I run protoconf from the root of the repo like this:
protoconf compile config/ config/src/main/domain1/v1/config.pconf
. To lint with Buf I have to run it fromconfig/src
, otherwise it will not be able to compile the imports or package declarations. For example this is howconfig/src/main/domain1/v1/schema.proto
starts:Second, the
materialized_config
dir and the.materialized_JSON
suffix. The first issue is that the file is not recognised as a JSON file by IDEs which is kind of annoying. I would suggestfile.materialized.json
. Second, I wish I could set the output path for example to pipe it tojq
for editing, sorting keys or pretty printing.The text was updated successfully, but these errors were encountered: