-
Notifications
You must be signed in to change notification settings - Fork 344
Config file discovery semantics #10
Comments
I think that requiring a I see where you're coming from with respect to on-boarding, but adding a configuration file to begin using a new tool seems to be a reasonable requirement. And now that we are only allowing one The naming seems fine to me as well. The tool is called What are your thoughts? I'm fine with resolving this issue for now if others agree. cc @peter-edge @AlexAPB |
We don't actually require one right now, there are sensible defaults - we can make it required if need be, but for general use you'll end up setting up a |
Cool, I'm fine with that! Like you've described, users will end up setting up a So in short:
|
fix: handle parser init error
Right now, config files are named
prototool.yaml
and searched for starting at the Protobuf file path, and going up a directory until hitting root. All paths in the config files can be relative or absolute, but if relative, the actual path used will start at the config file directory. If using directory mode, this means multipleprototool.yaml
files corresponding to multiple found directories with Protobuf files may be used. After a config file is found, Prototool walks starting at that directory searching for Protobuf files, or if no config file is found, Prototool searches starting at the current directory.A few things:
prototool.yaml
the right name?prototool.yaml
file in your repo, but do in your home directory,prototool
will go all the way down to your home directory, and then walk everything in your home directory, which can be annoying.prototool.yaml
file to useprototool
? See the above. It's good practice to always have aprototool.yaml
file to at least lock down the version ofprotoc
you use, but this can be annoying for OSS users who are just starting out.prototool.yaml
files to be discovered? If multipleprototool.yaml
files are discovered, this means that multiple calls toprotoc
must be done as they denote different builds, and more than oneFileDescriptorSet
is created. This gets bad when you do e.g. gRPC calls asfoo.bar.BazService
could be in more than oneFileDescriptorSet
, so you basically have to stop when you find the first one. All packages in Prototool have to handle multipleFileDescriptorSets
, which leads to some other bad outcomes. Most people shouldn't have multipleprototool.yaml
files, but it could be useful for compiling vendoredprototool.yaml
files.The text was updated successfully, but these errors were encountered: