Otherwise, it can be very hard to review a PR that updates a snapshot.
For some added context, #645 shows some differences in snapshot JSON that look like they're just reordering keys, but it's very hard to tell. Therefore, sort and indent the JSON on snapshot comparison so that the diffs are more obvious.
This was discovered on the way to fixing #644.
Note for reviewers: there are only a few manual changes in this PR:
the script at scripts/format-json-snapshots.py is added
It is invoked in during make format via the makefile change
tests/conftext.py is changed to format json before comparing workspace snapshots
all the changes to the snapshots themselves were made by running make format
Otherwise, it can be very hard to review a PR that updates a snapshot.
For some added context, #645 shows some differences in snapshot JSON that look like they're just reordering keys, but it's very hard to tell. Therefore, sort and indent the JSON on snapshot comparison so that the diffs are more obvious.
This was discovered on the way to fixing #644.
Note for reviewers: there are only a few manual changes in this PR:
make format
via the makefile changetests/conftext.py
is changed to format json before comparing workspace snapshotsmake format