Repository navigation
docs: librebar adoption plan - #47
Merged
Merged
Conversation
Swap colophon-core's hand-rolled figment ConfigLoader for a thin wrapper over librebar::config::ConfigLoader. Discovery semantics are unchanged: walk-up project search, .config/ then dotfile then bare name, XDG user config, TOML/YAML/JSON, deep merge. - add librebar 0.6 with the `config` feature only (no process-global state) - drop figment and directories as direct dependencies - ConfigSources is now re-exported from librebar, which adds value-origin and environment metadata for doctor/info to surface later - ConfigError::Deserialize carries a boxed std error instead of leaking figment::Error through the public API - XDG helpers delegate to librebar::config::user_*_dir - observability's log-directory probe uses the same helper so the directories dependency can go Two behavior changes come with librebar: - COLOPHON_-prefixed environment variables now feed config. They override discovered project and user files but not an explicitly selected --config file. - Boundary-marker traversal stops at the marker directory itself. The old code skipped that check when the marker sat in the search root, so a search starting inside a repo root could previously escape past it.
Delete the hand-rolled observability module (custom JSON log layer, timestamp formatter, and log target resolution) in favor of librebar::logging, wired up through the librebar::init builder. Replace the bespoke Cli struct with librebar::cli::CommonArgs, which supplies -q, -v, -C, -c, --color, --format, and --version-only as global flags. librebar::cli::parse_with also augments the command tree with the schema and completions subcommands, so colophon::command() is no longer needed to add compact help. --json survives as a hidden compatibility spelling for --format json. Output format now resolves through --format, which defaults to auto: text on a terminal, JSON when stdout is redirected. Note: xtask still calls colophon::command() and no longer compiles; it is not a default workspace member and is updated in a follow-up.
--json replaced by --format json, schema subcommand test added, extract test uses --format text to avoid auto-JSON in piped output.
Both generators now build from `librebar::cli::command::<colophon::Cli>()` instead of the removed `colophon::command()`, so man pages and completions describe the same tree `librebar::cli::parse_with` serves at runtime — including the `schema` and `completions` subcommands librebar injects. `librebar::cli::generate_manpages` replaces the hand-rolled clap_mangen loop. It walks the full subcommand tree, names pages by hyphenated command path, creates the output directory, and skips Clap's generated `help` subcommand, which the old loop would have emitted as a junk page. clap_complete stays a direct dependency: librebar does not re-export it, and the `--shell` flag needs its `Shell` enum.
No longer used directly — XDG resolution delegates through colophon-core to librebar::config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.