rust-cli / rust-cli/config-rs

re-thinking: track the source of settings

Open
#331 1 comment 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

E-help-wanted
Dominant language
Rust
Stars
3.2k
Forks
265
Avg merge
2h 42m
Merged PRs (30d)
4

Description

For debugging purposes (mostly on the user end), it would be great to be able to keep track of what source a setting came from. Especially when the same setting can come from the several sources, it can be a great way to figure out where a setting comes from.

For example, let's say a CLI app has some default settings, a global settings file, another one for the local project it works on, environment variables and eventually clap as last layer for settings input. That brings 5 different locations for potentially the same settings to the table.

When there are many settings, it's sometimes unclear why a program behaves a certain way, and then it can help to find out where some specific setting comes from.

Probably an extension of #323 and #324.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading issues #323 and #324, then inspect config-rs's existing layered settings model. Define how a setting records its source when multiple inputs are merged, including defaults, files, environment variables, and clap. Done means the source can be identified for a specific setting during debugging.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.