Skip to content

Commit

Permalink
chore: upgrade to GHC 9.8.1 (#1207)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhess authored Feb 8, 2024
2 parents abdb06b + 16ad850 commit cf67c6b
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 34 deletions.
12 changes: 11 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,17 @@ haddock-quickjump: True
haddock-hyperlink-source: True
haddock-internal: True

allow-newer: hedgehog-classes:hedgehog,hedgehog-classes:pretty-show,hedgehog:pretty-show
allow-newer:
, hedgehog-classes:hedgehog
, hedgehog-classes:pretty-show
, hedgehog:pretty-show
, logging-effect:base
, refined:base
, refined:deepseq
, refined:template-haskell
, refined:aeson
, these-skinny:base
, selda:bytestring

package *
ghc-options: -fwrite-ide-info
Expand Down
21 changes: 15 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,29 @@
in
builtins.trace "Nix Primer version is ${v}" "git-${v}";

ghcVersion = "ghc964";
ghcVersion = "ghc981";

# We must keep the weeder version in sync with the version of
# GHC we're using.
weederVersion = "2.6.0";

# Fourmolu updates often alter formatting arbitrarily, and we want to
# have more control over this.
fourmoluVersion = "0.14.0.0";
fourmoluVersion = "0.14.1.0";

allOverlays = [
inputs.haskell-nix.overlay
inputs.self.overlays.default
];

# cabal-fmt needs an override for GHC 9.8.1.
cabal-fmt-override = {
version = "latest";
cabalProject = ''
packages: .
allow-newer: cabal-fmt:base
'';
};
in
flake-parts.lib.mkFlake { inherit inputs; } {
debug = true;
Expand Down Expand Up @@ -195,7 +204,7 @@
haskellNixTools = pkgs.haskell-nix.tools ghcVersion {
hlint = "latest";
fourmolu = fourmoluVersion;
cabal-fmt = "latest";
cabal-fmt = cabal-fmt-override;
};
in
{
Expand Down Expand Up @@ -316,8 +325,8 @@
wasm = pkgs.mkShell {
packages = with inputs.ghc-wasm.packages.${system};
[
wasm32-wasi-ghc-9_6
wasm32-wasi-cabal-9_6
wasm32-wasi-ghc-9_8
wasm32-wasi-cabal-9_8
wasmtime

pkgs.gnumake
Expand Down Expand Up @@ -495,7 +504,7 @@

fourmolu = fourmoluVersion;

cabal-fmt = "latest";
cabal-fmt = cabal-fmt-override;

#TODO Explicitly requiring tasty-discover shouldn't be necessary - see the commented-out `build-tool-depends` in primer.cabal.
tasty-discover = "latest";
Expand Down
4 changes: 2 additions & 2 deletions primer-api/primer-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ library
-Wmissing-deriving-strategies -fhide-source-paths

build-depends:
, base >=4.12 && <4.19
, base >=4.12 && <4.20
, containers >=0.6.0.1 && <0.7.0
, deriving-aeson >=0.2 && <0.3.0
, extra >=1.7.10 && <1.8.0
Expand Down Expand Up @@ -149,7 +149,7 @@ test-suite primer-api-test
, protolude
, stm
, stm-containers
, tasty ^>=1.4.2.1
, tasty ^>=1.5
, tasty-discover
, tasty-golden ^>=2.3.5
, tasty-hunit
Expand Down
8 changes: 4 additions & 4 deletions primer-benchmark/primer-benchmark.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ library
hs-source-dirs: src
exposed-modules: Benchmarks
build-depends:
, aeson >=2.0 && <2.2
, base >=4.12 && <4.19
, aeson >=2.0 && <2.3
, base >=4.12 && <4.20
, containers >=0.6.0.1 && <0.7.0
, criterion ^>=1.6.0.0
, deepseq ^>=1.4.6.1
, deepseq ^>=1.5
, logging-effect ^>=1.4
, primer:{primer, primer-testlib}
, tasty ^>=1.4.2.1
, tasty ^>=1.5
, tasty-hunit ^>=0.10.0
, text ^>=2.0

Expand Down
8 changes: 4 additions & 4 deletions primer-selda/primer-selda.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ library
-Wmissing-deriving-strategies -fhide-source-paths

build-depends:
, aeson >=2.0 && <2.2
, base >=4.12 && <4.19
, bytestring >=0.10.8.2 && <0.12.0
, aeson >=2.0 && <2.3
, base >=4.12 && <4.20
, bytestring >=0.10.8.2 && <0.13
, containers >=0.6.0.1 && <0.7.0
, logging-effect ^>=1.4
, mtl >=2.2.2 && <2.4.0
Expand Down Expand Up @@ -116,7 +116,7 @@ test-suite primer-selda-test
, primer:{primer, primer-testlib}
, selda
, selda-sqlite
, tasty ^>=1.4.2.1
, tasty ^>=1.5
, tasty-discover ^>=5.0
, tasty-hunit ^>=0.10.0
, text
Expand Down
20 changes: 10 additions & 10 deletions primer-service/primer-service.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ library
-Wmissing-deriving-strategies -fhide-source-paths

build-depends:
, aeson >=2.0 && <2.2
, base >=4.12 && <4.19
, aeson >=2.0 && <2.3
, base >=4.12 && <4.20
, containers >=0.6.0.1 && <0.7
, deriving-aeson >=0.2 && <0.3.0
, exceptions >=0.10.4 && <0.11.0
Expand All @@ -56,11 +56,11 @@ library
, primer ^>=0.7.2
, primer-api ^>=0.7.2
, refined ^>=0.8
, servant >=0.18 && <0.20.0
, servant-client >=0.18 && <0.20.0
, servant-client-core >=0.18 && <0.20.0
, servant >=0.18 && <0.20.2
, servant-client >=0.18 && <0.20.2
, servant-client-core >=0.18 && <0.20.2
, servant-openapi3 ^>=2.0.1.2
, servant-server >=0.18 && <0.20.0
, servant-server >=0.18 && <0.20.2
, stm ^>=2.5
, stm-containers >=1.1 && <1.3.0
, streaming-commons ^>=0.2.2.4
Expand Down Expand Up @@ -98,7 +98,7 @@ executable primer-service
, directory ^>=1.3
, exceptions
, logging-effect ^>=1.4
, optparse-applicative ^>=0.17
, optparse-applicative ^>=0.18
, primer
, primer-api
, primer-selda ^>=0.7.2
Expand Down Expand Up @@ -131,7 +131,7 @@ executable primer-client

build-depends:
, base
, bytestring >=0.10.8.2 && <0.12.0
, bytestring >=0.10.8.2 && <0.13
, directory
, exceptions
, http-client-tls ^>=0.3.6.1
Expand Down Expand Up @@ -195,7 +195,7 @@ test-suite primer-service-test
, bytestring
, hedgehog ^>=1.4
, hedgehog-quickcheck ^>=0.1.1
, hspec ^>=2.10
, hspec ^>=2.11
, openapi3
, pretty-simple ^>=4.1
, primer-api:{primer-api, primer-api-hedgehog}
Expand All @@ -204,7 +204,7 @@ test-suite primer-service-test
, primer:{primer, primer-hedgehog, primer-testlib}
, QuickCheck ^>=2.14.2
, servant-openapi3
, tasty ^>=1.4.1
, tasty ^>=1.5
, tasty-discover ^>=5.0
, tasty-golden ^>=2.3.5
, tasty-hedgehog ^>=1.4.0.2
Expand Down
3 changes: 1 addition & 2 deletions primer-service/src/Primer/Pagination.hs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ import Servant (
ErrorFormatters,
FromHttpApiData (parseUrlPiece),
HasContextEntry,
HasServer (hoistServerWithContext, route),
HasServer (ServerT, hoistServerWithContext, route),
QueryParam,
ServerT,
ToHttpApiData (toUrlPiece),
(:>),
type (.++),
Expand Down
3 changes: 1 addition & 2 deletions primer-service/src/Servant/OpenApi/OperationId.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import Data.OpenApi (allOperations)
import Data.Text (pack)
import Optics (traversalVL, (%), (%~))
import Servant (
HasServer (hoistServerWithContext, route),
ServerT,
HasServer (ServerT, hoistServerWithContext, route),
type (:>),
)
import Servant.Client.Core (
Expand Down
6 changes: 3 additions & 3 deletions primer/primer.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ library
-Wmissing-deriving-strategies -fhide-source-paths

build-depends:
, aeson >=2.0 && <2.2
, aeson >=2.0 && <2.3
, assoc ^>=1.1
, base >=4.12 && <4.19
, base >=4.12 && <4.20
, base64-bytestring ^>=1.2.1
, containers >=0.6.0.1 && <0.7.0
, deriving-aeson >=0.2 && <0.3.0
Expand Down Expand Up @@ -293,7 +293,7 @@ test-suite primer-test
, primer-hedgehog
, primer-testlib
, protolude
, tasty ^>=1.4.2.1
, tasty ^>=1.5
, tasty-discover
, tasty-golden ^>=2.3.5
, tasty-hedgehog
Expand Down

1 comment on commit cf67c6b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Primer benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: cf67c6b Previous: abdb06b Ratio
typecheck/mapOdd 1: outlier variance 0.14439836847992224 outlier variance 0.015380859375 outlier variance 9.39

This comment was automatically generated by workflow using github-action-benchmark.

CC: @dhess

Please sign in to comment.