Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc: ['9.12', '9.10', '9.8', '9.6', '9.4', '9.2', '9.0', '8.10', '8.8']
ghc: ['9.14', '9.12', '9.10', '9.8', '9.6', '9.4', '9.2', '9.0', '8.10', '8.8']
include:
- os: windows-latest
- os: macOS-latest
Expand Down
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Changelog for Shake (* = breaking change)

Test with GHC 9.14, preserving exception call stacks on GHC 9.12 and later
0.19.9, released 2026-01-19
Test with GHC 9.12, improving some errors
0.19.8, released 2024-01-14
Expand Down
2 changes: 1 addition & 1 deletion shake.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ description:
(e.g. compiler version).
homepage: https://shakebuild.com
bug-reports: https://github.com/ndmitchell/shake/issues
tested-with: GHC==9.12, GHC==9.10, GHC==9.8, GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8
tested-with: GHC==9.14, GHC==9.12, GHC==9.10, GHC==9.8, GHC==9.6, GHC==9.4, GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8
extra-doc-files:
CHANGES.txt
README.md
Expand Down
14 changes: 12 additions & 2 deletions src/General/Extra.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ module General.Extra(
) where

import Control.Exception.Extra
#if __GLASGOW_HASKELL__ >= 912
import Control.Exception.Backtrace
import Control.Exception.Context
#endif
import Data.Char
import Data.List.Extra
import System.Environment
Expand Down Expand Up @@ -287,10 +291,16 @@ parseCallStack = reverse . map trimStart . drop1 . lines

callStackFull = parseCallStack $ prettyCallStack $ popCallStack callStack

#if __GLASGOW_HASKELL__ < 912
#if __GLASGOW_HASKELL__ >= 912
-- GHC 9.12 moved call stacks from ErrorCall into exception annotations.
callStackFromException e = (concatMap parseBacktraces $ getExceptionAnnotations $ someExceptionContext e, e)
where
parseBacktraces = reverse . map trimStart . takeWhile (" " `isPrefixOf`) . drop1 .
dropWhile (/= "HasCallStack backtrace:") . lines . displayBacktraces
#else
callStackFromException e | Just (ErrorCallWithLocation msg loc) <- fromException e = (parseCallStack loc, toException $ ErrorCall msg)
#endif
callStackFromException e = ([], e)
#endif


---------------------------------------------------------------------
Expand Down
Loading