smetamath3 always continues after errors, and generate cache data including those errors. This is important for the language server use case, because we want to be able to start with an initially invalid file and enjoy the fruits of caching while evolving it into a valid file, but it does mean that errors, especially syntax errors, can produce a large number of secondary errors.
Probably the best fix here is to tag each diagnostic with the phase in which it is discovered, and then suppress any diagnostic and its associated notes if there is a textually earlier diagnostic from a strictly preceding phase with severity Error.
We could try to get fancier with identifying the relationship between primary and secondary errors, but that skirts uncomfortably close to "Read Your Mind" functionality.
smetamath3 always continues after errors, and generate cache data including those errors. This is important for the language server use case, because we want to be able to start with an initially invalid file and enjoy the fruits of caching while evolving it into a valid file, but it does mean that errors, especially syntax errors, can produce a large number of secondary errors.
Probably the best fix here is to tag each diagnostic with the phase in which it is discovered, and then suppress any diagnostic and its associated notes if there is a textually earlier diagnostic from a strictly preceding phase with severity
Error
.We could try to get fancier with identifying the relationship between primary and secondary errors, but that skirts uncomfortably close to "Read Your Mind" functionality.