You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
The JSON checker would be quite heavy. I think that finding out where and why issues sometimes occur with the json module is more efficient.
Still it is impossible to guarantee no errors will be left. For this I have added failsafes that should make sure the JSON files on disk are always sound, at the cost of eventual data losses (although I don't know if they can really be caused). By this I mean that an operation handling a JSON might fail and the ConfigFile handler will discard the changes instead of invalidating the JSON.
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
The text was updated successfully, but these errors were encountered: