Skip to content

Make ConfigFile much more reliable. #113

Description

@s0lst1ce

Describe the bug
As of now nearly no checks are done on the files being read as config. This is a big issue because sometimes we can end up with empty JSON which cannot be read by the std json library.
Moreover the website expects to always receive JSON files with all possible fields, although some may have placeholder values.

Steps to reproduce
It is unclear how exactly such issues occur. Most often another exception is risen while the file is open. Or parsing to save fails and the file can't be read anymore. Or Updates cause issues with old files.
The exact conditions to be met for the issue to arise is vague.

Expected behavior
Make sure all JSON config files, whatever they configure, always have all fields they should. This should be checked at startup and enforced throughout runtime.

Todo

  • make use of default configuration files for in-place replacements in case of an issue
  • have default files in each different config folder to be used as default
  • have a JSON checker
  • check all files on startup

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingqualityall issues which only affect the way code is written and that won't affect functionnality

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions