Open favonia opened 3 weeks ago
I assume you're thinking of this in relation to #160 and mikeshulman/narya#24. Reading #160 I also had the thought that this is maybe a natural abstraction. So as not to change the default behavior, my thought would be to have a buffer
wrapper that intercepts diagnostics from its supplied continuation and accumulates them. Then after that continuation completes, it does something with the accumulated diagnostics, as specified by the other arguments it received, such as:
In addition, for my application I think I would also want:
And probably most of this behavior should be separately configurable for fatal and non-fatal diagnostics.
@mikeshulman Got it. And I am also thinking about thread-safety so that it can solve #151. Perhaps we should just have a domain-specific language for this...
This is another thing that could be helpful for many purposes.