Fix display of HasCallStack backtraces when a test throws an error#472
Conversation
|
How to test this patch? Create a test, which throws an With GHC < 9.10: With GHC 9.10 (lots of garbage, but at least the first stack trace is relevant): With GHC 9.12: With GHC 9.14: I was not aiming to match the whole message between GHCs, because it would require much more CPP. But at least all of versions point to |
andreasabel
left a comment
There was a problem hiding this comment.
Is it possible to add a golden value test for this fix?
fdd0bfc to
df0bd92
Compare
It's hard to do so: we are testing Tasty's output, so a golden test would have to run another instance of Tasty to collect its output. Then, as demonstated above, the output somewhat varies from version to version of GHC and contains highly volatile data (like exact line and column numbers). |
There are two parts: * Catch and rethrow exceptions with context in our vendored-in fork of `async`. This is inspired by upstream PR simonmar/async#165. * Bridge over multiple changes to `displayException` in `base` to ensure that at least some stack trace is shown.
df0bd92 to
5ff0612
Compare
Closes #469. There are two parts:
async. This is inspired by upstream PR feat: support for exception context propagation simonmar/async#165.displayExceptioninbaseto ensure that at least some stack trace is shown.