Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Stricter json error enforcement #33931
SUMMARY: Infrastructure "Stricter json parsing; errors will occur in more places. This may cause some mods to fail to load"
Purpose of change
Our json parsing code is very permissive, and quite a lot of errors can go unnoticed. It will help content designers if we detect more errors, especially if they're detected in CI.
Describe the solution
Be stricter about parsing in the following way:
This caught some problems, which I've fixed in this PR:
Describe alternatives you've considered
I had to choose new values for the dialogue opinion changes. I assumed that they were intended to be random selections from a range, so I took the midpoint of the range, and rounded to the nearest integer (rounding in the direction more favourable to the player). Then removed the ones that were just zero after that. @I-am-Erk might want to make further changes depending on the original intention.
I want to further increase json parsing strictness. This is just the first step.
I tested with many of the included mods, but not all of them, so this might break some of the core mods, and it could certainly break third party mods. But usually the fix is pretty obvious.
Sep 10, 2019
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:
Also having loading issues: