Skip to content

Commit

Permalink
Update blessed GHC to 9.8.2.
Browse files Browse the repository at this point in the history
- Remove GHC 9.4 from CI.
- Allow with GHC 9.10.
  • Loading branch information
tbidne committed May 23, 2024
1 parent 1751e80 commit 9ad5c0f
Show file tree
Hide file tree
Showing 23 changed files with 322 additions and 254 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- main
- release
- updates
pull_request:
branches:
- main
Expand All @@ -15,11 +16,11 @@ jobs:
fail-fast: false
matrix:
ghc:
- vers: "9.4.8"
- vers: "9.6.5"
proj-file: ""
- vers: "9.6.4"
proj-file: "--project-file cabal.ghc964.project"
- vers: "9.8.1"
- vers: "9.8.2"
proj-file: "--project-file cabal.ghc982.project"
- vers: "9.10.1"
proj-file: ""
os:
- "macos-latest"
Expand Down Expand Up @@ -144,7 +145,7 @@ jobs:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
ghc-version: "9.6.4"
ghc-version: "9.8.2"
- name: Install binary
run: |
.github/scripts/release_osx.sh
Expand Down Expand Up @@ -181,7 +182,7 @@ jobs:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
ghc-version: "9.6.4"
ghc-version: "9.8.2"
- name: Install binary
run: |
.github/scripts/release_linux.sh
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ the major/minor/patch definitions apply to the application's interface / usage
### Changed
* Simplify reading final error message.
* Hide `--version` from primary usage section.
* Updated blessed GHC to GHC 9.8.2.

### Added
* Added GHC 9.10 support.

### Fixed
* More `HasCallStack` annotations for better callstacks in case something goes
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ If you have never built a haskell program before, [Cabal](#cabal) is probably th

* [`cabal 3.8+`](https://www.haskell.org/cabal/download.html)
* One of:
* [`ghc 9.4`](https://www.haskell.org/ghc/download.html)
* [`ghc 9.6`](https://www.haskell.org/ghc/download.html)
* [`ghc 9.8`](https://www.haskell.org/ghc/download.html)
* [`ghc 9.10`](https://www.haskell.org/ghc/download.html)

The easiest way to install these is generally [`ghcup`](https://www.haskell.org/ghcup/).

The current "blessed" version is `ghc-9.6.4`.
The current "blessed" version is `ghc-9.8.2`.

### Build Shrun

Expand All @@ -106,7 +106,7 @@ Once you have `cabal` and `ghc`, `shrun` can be built locally with `cabal build`
For further reproducibility, optional freeze files can be used e.g.

```sh
cabal build --project-file cabal.ghc964.project
cabal build --project-file cabal.ghc982.project
```

> [!NOTE]
Expand Down
39 changes: 22 additions & 17 deletions app/Main.hs
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
{-# LANGUAGE CPP #-}

Check failure on line 1 in app/Main.hs

View workflow job for this annotation

GitHub Actions / stack (macos-latest)

`gcc' failed in phase `C pre-processor'. (Exit code: 1)

module Main (main) where

import Effects.Exception qualified as Ex
import GHC.Conc.Sync (setUncaughtExceptionHandler)
import Shrun.Configuration.Env (makeEnvAndShrun)
import Shrun.Prelude

{- ORMOLU_DISABLE -}

main :: IO ()
main = do
setUncaughtExceptionHandler $ \ex ->
-- NOTE: Seems redundant, but sadly it isn't.
--
-- doNothingOnSuccess is solely used to stop ExitSuccess from poisoning the
-- error code because GHC determines exit success/failure based on the
-- presence of an uncaught exception. However, we still need to rethrow
-- the failure.
--
-- Moreover, we don't really want to print a CallStack for ExitFailure,
-- as we are throwing that whenever a command fails, and the CallStack
-- is just unhelpful noise.
case fromException ex of
-- should be impossible due to doNothingOnSuccess...
Just (MkExceptionCS ExitSuccess _) -> pure ()
-- for command failures
Just (MkExceptionCS (ExitFailure _) _) -> pure ()
Nothing -> putStrLn $ displayException ex
-- NOTE: Seems redundant, but sadly it isn't.
--
-- doNothingOnSuccess is solely used to stop ExitSuccess from poisoning the
-- error code because GHC determines exit success/failure based on the
-- presence of an uncaught exception. However, we still need to rethrow
-- the failure.
--
-- Moreover, we don't really want to print a CallStack for ExitFailure,
-- as we are throwing that whenever a command fails, and the CallStack
-- is just unhelpful noise.
#if MIN_VERSION_base(4, 20, 0)
setUncaughtExceptionHandler (putStrLn . Ex.displayInner)
#else
setUncaughtExceptionHandler (putStrLn . Ex.displayNoCS)
#endif

makeEnvAndShrun @IO @ConsoleRegion `catchCS` doNothingOnSuccess
where
Expand All @@ -32,3 +35,5 @@ main = do
doNothingOnSuccess :: ExitCode -> IO ()
doNothingOnSuccess ExitSuccess = pure ()
doNothingOnSuccess ex@(ExitFailure _) = throwM ex

{- ORMOLU_ENABLE -}
7 changes: 0 additions & 7 deletions benchmarks/baseline_9.6.4.csv

This file was deleted.

64 changes: 0 additions & 64 deletions benchmarks/baseline_9.6.4.svg

This file was deleted.

10 changes: 10 additions & 0 deletions benchmarks/baseline_ubuntu-latest_9.8.2_ci.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Name,Mean (ps),2*Stdev (ps),Allocated,Copied,Peak Memory
All.Basic Logging.10_000,424874375,35496180,858557,4866,8388608
All.Basic Logging.100_000,414872187,34787626,858666,4978,9437184
All.Basic Logging.1_000_000,418198593,27627318,858769,4816,9437184
All.Command Logging.10_000,594754062,50058574,977834,6139,9437184
All.Command Logging.100_000,579419062,41957020,977929,6235,9437184
All.Command Logging.1_000_000,596570625,46203452,991918,6708,9437184
All.File Logging.10_000,816050937,46860996,1118291,7041,9437184
All.File Logging.100_000,822995625,60041220,1118089,7180,9437184
All.File Logging.1_000_000,801665000,58974894,1117985,7194,9437184
112 changes: 112 additions & 0 deletions benchmarks/baseline_ubuntu-latest_9.8.2_ci.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions cabal.ghc964.project

This file was deleted.

3 changes: 3 additions & 0 deletions cabal.ghc982.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import: cabal.project

with-compiler: ghc-9.8.2
Loading

0 comments on commit 9ad5c0f

Please sign in to comment.