-
Notifications
You must be signed in to change notification settings - Fork 207
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
DX: generate default yaml, including help docs from code #333
Comments
This fits the concept: https://github.com/LukasKalbertodt/confique, but we have 2 challenges:
Some more findings:
Pragmatic option: Stick to rust docs. Document the entire Config hierarchy as much as possible, then Rust becomes source of truth, with these paths: Rust -> Website Rust -> example yaml in starters Rust -> Rustdocs |
Summary:
All in all, I'm closing this one after:
|
Configuration source of truth is at the Rust code. Today, we hold some defaults in a predefined YAML file, but not in the code, and the explanations are on top of each YAML field.
We should attempt for Config to describe:
Taking effect of defaults is not tied strongly to describing defaults. Users should always see all values in the generated YAML and their effective defaults INSTEAD of doing a "impl default" and magically setting defaults for users if they are not specified.
The opinion here, which is similar to Rails:
The text was updated successfully, but these errors were encountered: