Skip to content

Overhaul settings #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Avasam opened this issue Sep 29, 2021 · 1 comment · Fixed by #211
Closed

Overhaul settings #70

Avasam opened this issue Sep 29, 2021 · 1 comment · Fixed by #211
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or enhancement request Included in next release LiveSplit integration

Comments

@Avasam
Copy link
Collaborator

Avasam commented Sep 29, 2021

I want to overhaul the settings system.

First order of business is using a key-value system. TOML, JSON, XML, YAML, etc. This will future-proof any settings being added / removed and make different versions compatible with each-other without loosing any settings. As a nice bonus it will this make the settings human-readable.

The code will see a massive cleanup from this.

As mentioned above, by not overriding keys we don't use in the save file, we keep compatibility and settings for all versions after this change. It's also a lot less likely to get corrupted or break.

I'd also use this opportunity to fix any and all save and load issues we're having.

I'm fully willing to break settings from any previous version before this change. The cost is very minor for the end user (it takes less than a minute to redo one's settings). And we'll finally get rid of all the overly-complicated settings code.

@Avasam Avasam changed the title Overhaul settings Overhaul settings and remove legacy code Nov 15, 2021
@Avasam Avasam changed the title Overhaul settings and remove legacy code Overhaul settings Dec 7, 2021
@Avasam
Copy link
Collaborator Author

Avasam commented Dec 7, 2021

Edits: Legacy code already removed from other PRs and issues

I was naturally gravitating towards TOML, which is basically a better .ini format. It turns out this is what the Python community is going toward as well (see pyproject.toml)

@Avasam Avasam added enhancement New feature or enhancement request dependencies Pull requests that update a dependency file Included in next release documentation Improvements or additions to documentation LiveSplit integration labels Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or enhancement request Included in next release LiveSplit integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant