Diagnostic errors are now checked for uniqueness across the compiler and error metadata is written to JSON files.