ADR-0003: YAML is the default config format, TOML optional
Status |
accepted |
Affects |
Context
denver started on denver.yml. It then switched to denver.toml, and later
switched back. The arguments on each side:
For TOML |
For YAML |
|---|---|
In the stdlib since 3.11 ( |
Nested stage sections read far better than TOML tables |
Unambiguous types, no YAML surprises ( |
Lists of maps ( |
Already the format of |
Every user already writes YAML in CI files |
PyYAML is one small dependency, and denver already had it |
Decision
denver.yml(anddenver.yaml) is the default. PyYAML is a runtime dependency.denver.tomlstays supported. Both are dispatched by file name, everywhere<env>is.--show-config/--show-config-fulltake--format {yml,toml}, independent of what the env itself is written in.TOML output uses denver’s own renderer, not a library. Writing TOML needs far less than reading it.
Consequences
Bundled examples were converted to
denver.yml.Error messages had to stop naming
denver.tomlas the config file.A team preferring TOML loses nothing. A team preferring YAML gets the shorter file.
The TOML renderer is denver’s own code, and is covered by the same test gate as everything else.
TOML has no
null, so--show-config-full --format tomlwrites unset keys as commented-out# key = nulllines.