Rework settings/config#142
Open
ur-fault wants to merge 56 commits into
Open
Conversation
New system uses macro for generation full and partial config structs. - You can merge full + partial -> full - Primitives merge by overriding - Settings are split into sections allowing for easier management
config! now also has more features, namely supports custom attributes on Partial struct fields.
… sources New default settings use the new config model.
Using Tera templates, we can now generate default config with synced values from code, reducing duplication.
Default presets will stay inside the default config, but are not included in Default::default() one so that they don't break merging. For tests to pass, presets are ignored in equality assertion. We may instead just test their equality with hardcoded presets in test, or just include them inside the context for Tera.
Removed ones are: audio, box, empty_menu, one_menu, popup, updates
…nto rework-settings
…nto rework-settings
We don't want to break configs for anyone using the older format, so we support loading older configs on best-effort basis. Configs gained `meta` with name, description, authors and such, in which is also `format_version`, everything without specified `format_version` is supposed to be `1` so as not to break anything. We don't plan on supporting every version ever, when there is enough time and new versions, we may drop older versions. Also, we are bringing back named terminal color schemes.
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.
Uh oh!
There was an error while loading. Please reload this page.