config.yml is not one of the names nostui reads
- 主要言語
- Rust
- スター
- 71
- フォーク
- 5
- 平均マージ
- 4時間 2分
- マージ済み PR(30日)
- 31
説明
Split out of [#576](https://github.com/akiomik/nostui/pull/576), which added it on a misreading and took it out again.
## What happens
`Config::new` reads `config.json5`, `config.json`, `config.yaml`, `config.toml` and `config.ini`. A `config.yml` — the spelling most YAML in the wild uses — is not among them, so a directory holding one and nothing else gets `No configuration file found in …`, which is accurate and unhelpful.
The `config` crate does not fill the gap on nostui's behalf, which is worth writing down because it looks as though it might: `FileSourceFile::find_file` does try each extension a format claims, but only after an exact match fails, and it appends `.placeholder` before it starts — so the source built from `config.yaml` probes `config.yaml.yaml` and `config.yaml.yml`, never `config.yml`.
## What it would take
A second name for the YAML format, in the list `Config::new` builds its sources from and in the one the README gives. Two things want deciding with it:
- **Which wins when both exist.** Sources layer, so whichever is added last overrides the other. Silently preferring one is the kind of thing someone loses an afternoon to.
- **What a malformed one costs.** `required(false)` suppresses a missing file, not a parse error, so a half-edited `config.yml` beside a working `config.yaml` would stop nostui starting where it starts today.
## Acceptance
- A directory holding only `config.yml` starts nostui.
- What happens when `config.yaml` and `config.yml` are both present is decided, documented, and asserted.
コントリビューションガイド
評価
この issue はまだ評価されていません。