From bb36f571fe6e5f96a27e5b583587efafe3d42a8d Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Wed, 16 Aug 2023 14:48:26 +0100 Subject: [PATCH 1/2] chore: bump Nix dependencies & bump to GHC 9.6.2 Signed-off-by: Drew Hess --- cabal.project | 15 ++++++++------- flake.lock | 18 +++++++++--------- flake.nix | 4 ++-- primer-api/primer-api.cabal | 2 +- primer-api/src/Primer/API.hs | 4 ++++ primer-api/test/Tests/Database.hs | 4 ++++ primer-benchmark/primer-benchmark.cabal | 2 +- primer-selda/primer-selda.cabal | 2 +- .../src/Primer/Database/Selda/SQLite.hs | 4 ++++ primer-service/primer-service.cabal | 4 ++-- primer/primer.cabal | 2 +- primer/src/Primer/App.hs | 4 ++++ primer/src/Primer/Database.hs | 4 ++++ primer/test/Tests/Database.hs | 4 ++++ 14 files changed, 49 insertions(+), 24 deletions(-) diff --git a/cabal.project b/cabal.project index 99a280e8f..afd48c8a1 100644 --- a/cabal.project +++ b/cabal.project @@ -24,17 +24,18 @@ package primer-api package primer-service test-options: "--size-cutoff=32768" --- We need a newer version of Selda than what's been released to Hackage. +-- We need a newer version of Selda than what's been released to +-- Hackage, plus some GHC 9.6 fixes from a community fork. source-repository-package type: git - location: https://github.com/valderman/selda.git - tag: ab9619db13b93867d1a244441bb4de03d3e1dadb + location: https://github.com/guibou/selda + tag: 54c12169ce8cd46a7b3c698f65cea55e41a13fe6 subdir: selda - --sha256: 0rdpazkhx6wfxlf6izg9xzxjr9wqywzqmk0c2a23qyfvih0ylj9z + --sha256: 0q8m8asmb83mpa3j3adlrhc446xif7gv6lql20gv05k33lmbjfhg source-repository-package type: git - location: https://github.com/valderman/selda.git - tag: ab9619db13b93867d1a244441bb4de03d3e1dadb + location: https://github.com/guibou/selda + tag: 54c12169ce8cd46a7b3c698f65cea55e41a13fe6 subdir: selda-sqlite - --sha256: 0rdpazkhx6wfxlf6izg9xzxjr9wqywzqmk0c2a23qyfvih0ylj9z + --sha256: 0q8m8asmb83mpa3j3adlrhc446xif7gv6lql20gv05k33lmbjfhg diff --git a/flake.lock b/flake.lock index 7a07589d5..f2ab3825b 100644 --- a/flake.lock +++ b/flake.lock @@ -331,11 +331,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1692404638, - "narHash": "sha256-e7/+hPMbkcnmnOHYJNPHyobTaU4qzKI4HJTEsUuwu4A=", + "lastModified": 1692750150, + "narHash": "sha256-PQUa3d/xx/ow5+aWAJcbo5ReSfXUUaREmv11iv/gw0I=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "f1e90fd26b31b4f525cd10565fe8429b134dd335", + "rev": "5bdde609b165186227df40511bc0aa43c3fee3ac", "type": "github" }, "original": { @@ -401,11 +401,11 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1692406193, - "narHash": "sha256-OE+k0FO1uTZkq/KJXt+mzf8Vwzmr3DinFEcqZ8iWQIs=", + "lastModified": 1692759275, + "narHash": "sha256-OuaF9FgFtXEsoqSqp7yl8fuShpgR+DmYY+jlvh7anTg=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "3d97343f7d43d19b18769386c3ea93f905fcabbe", + "rev": "fc87a1ca9211b05267c9603752f008442db87c8b", "type": "github" }, "original": { @@ -903,11 +903,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1692317324, - "narHash": "sha256-AofEuurJHrfMljrCAkMKTWBC5xGluhBZiAfHQ73224Y=", + "lastModified": 1692749313, + "narHash": "sha256-gBe4uaEOoem6GwL2iN2v4oy4kts6GbQFbg2J9fkcgqs=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "4812a420235589a74f9278cca81f6dbf74ffb42f", + "rev": "347b8f075d0bfc69b4a88fe0bd2f0f0a1b2b1789", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 2c58e5f4b..697a3e66a 100644 --- a/flake.nix +++ b/flake.nix @@ -40,11 +40,11 @@ in builtins.trace "Nix Primer version is ${v}" "git-${v}"; - ghcVersion = "ghc945"; + ghcVersion = "ghc962"; # We must keep the weeder version in sync with the version of # GHC we're using. - weederVersion = "2.5.0"; + weederVersion = "2.6.0"; # Fourmolu updates often alter formatting arbitrarily, and we want to # have more control over this. diff --git a/primer-api/primer-api.cabal b/primer-api/primer-api.cabal index b2d9cf574..94c294cf7 100644 --- a/primer-api/primer-api.cabal +++ b/primer-api/primer-api.cabal @@ -33,7 +33,7 @@ library -Wmissing-deriving-strategies -fhide-source-paths build-depends: - , base >=4.12 && <4.18 + , base >=4.12 && <4.19 , containers >=0.6.0.1 && <0.7.0 , deriving-aeson >=0.2 && <0.3.0 , extra >=1.7.10 && <1.8.0 diff --git a/primer-api/src/Primer/API.hs b/primer-api/src/Primer/API.hs index 15063c483..7d0b2f544 100644 --- a/primer-api/src/Primer/API.hs +++ b/primer-api/src/Primer/API.hs @@ -5,6 +5,10 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} +-- Temporary workaround for GHC 9.6: +-- https://gitlab.haskell.org/ghc/ghc/-/issues/23143 +{-# OPTIONS -Wno-redundant-constraints #-} + -- | The Primer API. -- -- This module defines the Primer API, which is collection of diff --git a/primer-api/test/Tests/Database.hs b/primer-api/test/Tests/Database.hs index 7d4aaf114..557093911 100644 --- a/primer-api/test/Tests/Database.hs +++ b/primer-api/test/Tests/Database.hs @@ -1,5 +1,9 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} +-- Temporary workaround for GHC 9.6: +-- https://gitlab.haskell.org/ghc/ghc/-/issues/23143 +{-# OPTIONS -Wno-redundant-constraints #-} + module Tests.Database where import Foreword diff --git a/primer-benchmark/primer-benchmark.cabal b/primer-benchmark/primer-benchmark.cabal index 3b4553807..00eec273a 100644 --- a/primer-benchmark/primer-benchmark.cabal +++ b/primer-benchmark/primer-benchmark.cabal @@ -41,7 +41,7 @@ library exposed-modules: Benchmarks build-depends: , aeson >=2.0 && <2.2 - , base >=4.12 && <4.18 + , base >=4.12 && <4.19 , containers >=0.6.0.1 && <0.7.0 , criterion ^>=1.6.0.0 , deepseq ^>=1.4.6.1 diff --git a/primer-selda/primer-selda.cabal b/primer-selda/primer-selda.cabal index 7d38cff19..eb0ce2fae 100644 --- a/primer-selda/primer-selda.cabal +++ b/primer-selda/primer-selda.cabal @@ -33,7 +33,7 @@ library build-depends: , aeson >=2.0 && <2.2 - , base >=4.12 && <4.18 + , base >=4.12 && <4.19 , bytestring >=0.10.8.2 && <0.12.0 , containers >=0.6.0.1 && <0.7.0 , logging-effect ^>=1.4 diff --git a/primer-selda/src/Primer/Database/Selda/SQLite.hs b/primer-selda/src/Primer/Database/Selda/SQLite.hs index 09a20a12c..3b98e2f42 100644 --- a/primer-selda/src/Primer/Database/Selda/SQLite.hs +++ b/primer-selda/src/Primer/Database/Selda/SQLite.hs @@ -1,6 +1,10 @@ {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE UndecidableInstances #-} +-- Temporary workaround for GHC 9.6: +-- https://gitlab.haskell.org/ghc/ghc/-/issues/23143 +{-# OPTIONS -Wno-redundant-constraints #-} + module Primer.Database.Selda.SQLite ( -- * The "Database.Selda.SQLite" database adapter. MonadSeldaSQLiteDb, diff --git a/primer-service/primer-service.cabal b/primer-service/primer-service.cabal index 44822f02a..2efaf546b 100644 --- a/primer-service/primer-service.cabal +++ b/primer-service/primer-service.cabal @@ -40,7 +40,7 @@ library build-depends: , aeson >=2.0 && <2.2 - , base >=4.12 && <4.18 + , base >=4.12 && <4.19 , containers >=0.6.0.1 && <0.7 , deriving-aeson >=0.2 && <0.3.0 , exceptions >=0.10.4 && <0.11.0 @@ -103,7 +103,7 @@ executable primer-service , primer-api , primer-selda ^>=0.7.2 , primer-service - , prometheus-client ^>=1.1.0 + , prometheus-client ^>=1.1.1 , prometheus-metrics-ghc ^>=1.0.1.2 , stm , stm-containers diff --git a/primer/primer.cabal b/primer/primer.cabal index 5dc4104a5..49298582f 100644 --- a/primer/primer.cabal +++ b/primer/primer.cabal @@ -106,7 +106,7 @@ library build-depends: , aeson >=2.0 && <2.2 , assoc ^>=1.1 - , base >=4.12 && <4.18 + , base >=4.12 && <4.19 , containers >=0.6.0.1 && <0.7.0 , deriving-aeson >=0.2 && <0.3.0 , exceptions >=0.10.4 && <0.11.0 diff --git a/primer/src/Primer/App.hs b/primer/src/Primer/App.hs index 2d51bf1ab..d40356f79 100644 --- a/primer/src/Primer/App.hs +++ b/primer/src/Primer/App.hs @@ -6,6 +6,10 @@ {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ViewPatterns #-} +-- Temporary workaround for GHC 9.6: +-- https://gitlab.haskell.org/ghc/ghc/-/issues/23143 +{-# OPTIONS -Wno-redundant-constraints #-} + -- This module defines the high level application functions. module Primer.App ( diff --git a/primer/src/Primer/Database.hs b/primer/src/Primer/Database.hs index 8fe8ea164..1596cb5a0 100644 --- a/primer/src/Primer/Database.hs +++ b/primer/src/Primer/Database.hs @@ -1,6 +1,10 @@ {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE OverloadedLabels #-} +-- Temporary workaround for GHC 9.6: +-- https://gitlab.haskell.org/ghc/ghc/-/issues/23143 +{-# OPTIONS -Wno-redundant-constraints #-} + module Primer.Database ( SessionId, -- 'SessionName' is abstract. Do not export its constructors. diff --git a/primer/test/Tests/Database.hs b/primer/test/Tests/Database.hs index d253bc92f..865d2cc25 100644 --- a/primer/test/Tests/Database.hs +++ b/primer/test/Tests/Database.hs @@ -1,5 +1,9 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} +-- Temporary workaround for GHC 9.6: +-- https://gitlab.haskell.org/ghc/ghc/-/issues/23143 +{-# OPTIONS -Wno-redundant-constraints #-} + module Tests.Database where import Foreword From aaebc1aaebd3ce13f953da0c344bdd108b5ca73a Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Wed, 23 Aug 2023 20:11:38 +0100 Subject: [PATCH 2/2] chore: temporarily disable Weeder Weeder doesn't build with the latest `nixpkgs` pin. I don't want it to block Wasm work, so I'm disabling it for now until I have time to look into it. Signed-off-by: Drew Hess --- flake.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 697a3e66a..655b04ee9 100644 --- a/flake.nix +++ b/flake.nix @@ -243,7 +243,9 @@ // primerFlake.packages; checks = { - inherit weeder openapi-validate; + # Disabled, as it doesn't currently build with Nix. + #inherit weeder; + inherit openapi-validate; inherit primer-sqitch-test-sqlite; } @@ -464,7 +466,8 @@ cabal = "latest"; hlint = "latest"; - weeder = weederVersion; + # Disabled, as it doesn't currently build with Nix. + #weeder = weederVersion; fourmolu = fourmoluVersion;