buf
buf copied to clipboard
Clearing up error messages in `bufconfig`
GitHub Repository
N/A
Commands
$ buf generate
Output
# rm -rf gen && buf generate --template buf.directory.invalid.gen.yaml && tree gen
Failure: decode config file: option branch is not allowed for InputConfigType directory
18:17
# buf generate
Failure: decode buf.gen.yaml: invalid as version v2: could not unmarshal as YAML: yaml: unmarshal errors:
line 10: field option not found in type bufconfig.externalManagedOverrideConfigV2
Expected Output
This case came up for buf generate, but this a general note on the errors when handling configs -- we are returning the marshal/unmarshal errors, which leak some internal types (e.g. InputConfigType), which may not be helpful to the user. We may want to rework these error messages.
Anything else?
No response