Implement filtering of duplicate errors in SilFrontend#778
Conversation
…sn't happen when Viper is run from frontends
|
How does the backend know that the errors are going to be reported via stdout? Is the assumption that |
|
SilFrontend is basically always used, but the finish method where the filtering now happens is only called from execute, which is not called when the frontend API is used. |
|
Thanks! Could it be worth adding a comment to |
I just realized that |
The intention is to avoid reporting two errors via stdout that have the exact same message and position, which provides no value to the user.
Currently, Silicon implements this itself, but Carbon does not. This PR adds an implementation in Silver to replace the one in Silicon (and in the process ensure that the filtering only happens when outputting to stdout, since the filtering can cause issues for frontends, see viperproject/silicon#735).