packages feed

sydtest 0.17.0.1 → 0.17.0.2

raw patch · 3 files changed

+15/−3 lines, 3 files

Files

CHANGELOG.md view
@@ -1,5 +1,12 @@ # Changelog +## [0.17.0.2] - 2024-09-26++### Changed++- Sydtest won't crash anymore, behave weirdly, or leak resources when executed+  in a REPL and interrupted by C-c.+ ## [0.17.0.1] - 2024-09-26  ### Changed
src/Test/Syd/Run.hs view
@@ -374,8 +374,13 @@  exceptionHandlers :: [Handler (Either SomeException a)] exceptionHandlers =-  [ -- Re-throw AsyncException, otherwise execution will not terminate on SIGINT (ctrl-c).-    Handler (\e -> throwIO (e :: AsyncException)),+  [ -- Re-throw SomeAsyncException, otherwise execution will not terminate on SIGINT (ctrl-c).+    -- This is also critical for correctness, because library such as async+    -- uses this signal for `concurrently`, and `race`, ..., and if we ignore+    -- this exception, we can end in a context where half of the logic has+    -- stopped and yet we continue.+    -- See https://github.com/NorfairKing/sydtest/issues/80+    Handler (\e -> throwIO (e :: SomeAsyncException)),     -- Catch all the rest     Handler (\e -> return $ Left (e :: SomeException))   ]
sydtest.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           sydtest-version:        0.17.0.1+version:        0.17.0.2 synopsis:       A modern testing framework for Haskell with good defaults and advanced testing features. description:    A modern testing framework for Haskell with good defaults and advanced testing features. Sydtest aims to make the common easy and the hard possible. See https://github.com/NorfairKing/sydtest#readme for more information. category:       Testing