refactor: prefer config.toml over inlyne.toml - #472
Open
mmclinton wants to merge 1 commit into
Open
Conversation
The config file repeated the program name inside a directory already called `inlyne/`. New installs now get `config.toml`. An existing `inlyne.toml` keeps working indefinitely and is read and written in place, so nobody has to rename anything. When both files are present `config.toml` wins and the ignored one is named in a warning. Resolution is shared rather than duplicated because `config open` writes back to the path it resolves. Had only the load path learned the new name, `config open` would have edited one file while startup read the other, and the user's edits would have silently vanished. Closes Inlyne-Project#354
Author
|
Heads up: I've opened #473 (fixes #471, They're independent. No ordering requirement, merge them in whatever order suits you. I'll rebase the second one; what that rebase involves is spelled out in #473's description. |
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.
Closes #354
New installs get
config.toml. An existinginlyne.tomlkeeps working indefinitely. It's read and written in place, so there's nothing to rename. When both are presentconfig.tomlwins and the ignored one gets named in a warning.Resolution is shared between startup and
config openrather than duplicated, sinceconfig openwrites back to the path it resolves. Had only the load path learned the new name,config openwould have edited one file while startup read the other.Unit tests cover the four resolution cases (neither file present, legacy only, current only, both) and that a directory named
config.tomldoesn't shadow a realinlyne.toml. Also checked by hand on Linux and macOS that either name is picked up on its own, and thatconfig.tomlwins when both are there:2026-08-02T20:38:59.210662Z WARN inlyne::opts::config: Ignoring '/Users/mmc/Library/Application Support/inlyne/inlyne.toml' in favor of '/Users/mmc/Library/Application Support/inlyne/config.toml'I ran into #471 while working on this. It's a pre-existing bug in the same config open arm and independent of the rename, so it's not included here.