feat(config): add support for include directive in configuration#140
Open
dmayle wants to merge 1 commit intofiffeek:mainfrom
Open
feat(config): add support for include directive in configuration#140dmayle wants to merge 1 commit intofiffeek:mainfrom
dmayle wants to merge 1 commit intofiffeek:mainfrom
Conversation
This change introduces the 'include' directive to the TOML configuration system, resolving fiffeek#139. Users can now modularize their configuration by splitting profiles across multiple files. Key implementation details: - Implemented recursive pre-processing in 'processIncludes' to merge file content before TOML decoding. - Supports both single strings and lists of strings for the 'include' key. - Handles relative paths relative to the directory of the file currently being processed. - Enforces a recursion depth limit to prevent infinite loops. - Added comprehensive tests covering relative paths and list inclusions. - Updated filewatcher to monitor included files for changes, triggering auto-reload. - Code quality improvements: regex compilation optimization, better error wrapping, and constant usage.
Owner
|
Hey! Thanks for the contribution, collecting my thoughts about the implementation and will get back to you shortly, overall great job! |
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.
What does this PR do?
This change introduces the 'include' directive to the TOML configuration system, resolving #139. Users can now modularize their configuration by splitting profiles across multiple files.
Key implementation details:
Why is this change important?
Makes dynamic configs more palatable when using Nix
How to test this PR locally?
There are tests included, but you can just split your config with an include directive
Related issues
Closes #234