From 8a5c6ae9d97ced5ec00669cdb9c2691927e50207 Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Mon, 13 Mar 2023 09:18:53 +0000 Subject: [PATCH 01/11] chore(nix): Bump to haskell.nix experimental GHC 9.6 branch. Also bump to GHC 9.6.1. --- cabal.project | 5 ++-- flake.lock | 78 +++++++++++++++++++++++++-------------------------- flake.nix | 2 +- 3 files changed, 43 insertions(+), 42 deletions(-) diff --git a/cabal.project b/cabal.project index f6804d0cc..8818dd442 100644 --- a/cabal.project +++ b/cabal.project @@ -1,4 +1,4 @@ -index-state: 2023-02-23T00:00:00Z +index-state: 2023-03-18T00:00:00Z packages: primer @@ -19,7 +19,8 @@ package primer package primer-service test-options: "--size-cutoff=32768" -allow-newer: logging-effect:text +-- Temporary during GHC 9.6.1 bring-up. +allow-newer: *:* -- We need a newer version of Selda than what's been released to Hackage. source-repository-package diff --git a/flake.lock b/flake.lock index bd033a26c..bd718298d 100644 --- a/flake.lock +++ b/flake.lock @@ -276,11 +276,11 @@ "nixpkgs-lib": "nixpkgs-lib_2" }, "locked": { - "lastModified": 1677714448, - "narHash": "sha256-Hq8qLs8xFu28aDjytfxjdC96bZ6pds21Yy09mSC156I=", + "lastModified": 1678379998, + "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "dc531e3a9ce757041e1afaff8ee932725ca60002", + "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", "type": "github" }, "original": { @@ -462,11 +462,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1678494185, - "narHash": "sha256-O3UHAguJwdG7maUakbLjHhCLtsTtI3X6g3kAHoI5cRU=", + "lastModified": 1679099041, + "narHash": "sha256-iHBCQ6pQBsmoXW0tJ0FAhjBlsNaQwPN9l89Z6HThlaY=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "2974e3b444eb8680d52adfcc6b9f23d9614e2ad7", + "rev": "c6a508508f4947deb0aa3857501eef86bc8a7238", "type": "github" }, "original": { @@ -489,11 +489,11 @@ "sops-nix": "sops-nix" }, "locked": { - "lastModified": 1678040136, - "narHash": "sha256-ViJx7BQWqVv6cGC/4yzNRR47eqRycT5OdInCVYlQRfA=", + "lastModified": 1679107579, + "narHash": "sha256-dmVnih53dApn+x0cZXCutTcOL6J+YW7vwfIDyxxgjK8=", "owner": "hackworthltd", "repo": "hacknix", - "rev": "15059d330237066bc643f87f563f3b0e190ab53b", + "rev": "75667b3063f5a905c2b9deb4739f4f4c25e5205e", "type": "github" }, "original": { @@ -531,11 +531,11 @@ "tullia": "tullia" }, "locked": { - "lastModified": 1678495836, - "narHash": "sha256-y4FzKmY+nLLD6CrXxNsK/dMQJtO1KpcRagVs5XzjHdo=", + "lastModified": 1679100683, + "narHash": "sha256-8LiTc8vgNz6f0r901SzkKo6RMfFJl8uGDN2wp0sG+vI=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "02394687c4ae19c9d660fd247f11d0bafe2bc132", + "rev": "f9c44b9da112254981455ff99bcd0e9800f0dcc9", "type": "github" }, "original": { @@ -820,11 +820,11 @@ ] }, "locked": { - "lastModified": 1677834279, - "narHash": "sha256-JHKdz4+KtDcCuIxt7jl03/wv3gMVCN5cHuED7SYS75c=", + "lastModified": 1678351966, + "narHash": "sha256-tRFEU0lu3imZb3dtELBY+UbEhWXbb0xlBrsIlpICb+A=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "59d63c5bb0574048d3519c268fccf73e57220bf5", + "rev": "0c043999b16caba6fb571af2d228775729829943", "type": "github" }, "original": { @@ -948,11 +948,11 @@ "nixpkgs-lib_2": { "locked": { "dir": "lib", - "lastModified": 1677407201, - "narHash": "sha256-3blwdI9o1BAprkvlByHvtEm5HAIRn/XPjtcfiunpY7s=", + "lastModified": 1678375444, + "narHash": "sha256-XIgHfGvjFvZQ8hrkfocanCDxMefc/77rXeHvYdzBMc8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7f5639fa3b68054ca0b062866dc62b22c3f11505", + "rev": "130fa0baaa2b93ec45523fdcde942f6844ee9f6e", "type": "github" }, "original": { @@ -981,11 +981,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1673800717, - "narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=", + "lastModified": 1678872516, + "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f", + "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", "type": "github" }, "original": { @@ -997,11 +997,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1677560965, - "narHash": "sha256-Tqwt5alTtMnbYUPKCYRYZqlfbjprLgDWqjMhXpFMQ6k=", + "lastModified": 1678582009, + "narHash": "sha256-J8QzUOOv3/y97q19pGOz28gLC3lAUy1c4bWpsi5D460=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "40968a3aa489191cf4b7ba85cf2a54d8a75c8daa", + "rev": "c34fc09c77172c4189df4594a0749e25a23cdd9b", "type": "github" }, "original": { @@ -1013,11 +1013,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1673800717, - "narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=", + "lastModified": 1678872516, + "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f", + "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", "type": "github" }, "original": { @@ -1150,11 +1150,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1677832802, - "narHash": "sha256-XQf+k6mBYTiQUjWRf/0fozy5InAs03O1b30adCpWeXs=", + "lastModified": 1678976941, + "narHash": "sha256-skNr08frCwN9NO+7I77MjOHHAw+L410/37JknNld+W4=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "382bee738397ca005206eefa36922cc10df8a21c", + "rev": "32b1dbedfd77892a6e375737ef04d8efba634e9e", "type": "github" }, "original": { @@ -1174,11 +1174,11 @@ "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { - "lastModified": 1678376203, - "narHash": "sha256-3tyYGyC8h7fBwncLZy5nCUjTJPrHbmNwp47LlNLOHSM=", + "lastModified": 1678976941, + "narHash": "sha256-skNr08frCwN9NO+7I77MjOHHAw+L410/37JknNld+W4=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "1a20b9708962096ec2481eeb2ddca29ed747770a", + "rev": "32b1dbedfd77892a6e375737ef04d8efba634e9e", "type": "github" }, "original": { @@ -1209,11 +1209,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1677833841, - "narHash": "sha256-yHZFGe7dhBE43FFWKiWc29NuveH+nfyTT6oKyFDEMys=", + "lastModified": 1678590185, + "narHash": "sha256-scvu8HegWwbcvPKjh6M1DnpPYAv4EnP1krsRPItoQ+E=", "owner": "Mic92", "repo": "sops-nix", - "rev": "128e9b29ddd88ceb634a28f7dbbfee7b895f005f", + "rev": "9e98f7a442b0e318de9cce757675c2ab922bdf2b", "type": "github" }, "original": { @@ -1225,11 +1225,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1678493393, - "narHash": "sha256-RfZsYHaD1jOdBx0CneMMl0vwIy91A/H4BJs7aMvph40=", + "lastModified": 1679098159, + "narHash": "sha256-b208vhFBDeoSDpl11izIb93iYb/eWxmRqvNptQw+cAE=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "24ea8d4a9de68d38b688c6bb391da49d8c2f8153", + "rev": "b453571e0ae1215a8b97a17b0809c9d1cca92f67", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 995a236f3..d44e00cf6 100644 --- a/flake.nix +++ b/flake.nix @@ -40,7 +40,7 @@ in builtins.trace "Nix Primer version is ${v}" "git-${v}"; - ghcVersion = "ghc926"; + ghcVersion = "ghc961"; # We must keep the weeder version in sync with the version of # GHC we're using. From bbe254d9a85be2f6b78ab3568f46aa2605d356e9 Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Wed, 15 Mar 2023 16:35:49 +0000 Subject: [PATCH 02/11] chore: Disable aarch64-darwin during GHC 9.6.1 bring-up. --- flake.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index d44e00cf6..dfb757bfd 100644 --- a/flake.nix +++ b/flake.nix @@ -62,7 +62,7 @@ inputs.pre-commit-hooks-nix.flakeModule ./nix/flake-parts/benchmarks.nix ]; - systems = [ "x86_64-linux" "aarch64-darwin" ]; + systems = [ "x86_64-linux" ]; perSystem = { config, pkgs, system, ... }: let @@ -737,9 +737,7 @@ name = "required-ci"; constituents = builtins.map builtins.attrValues (with inputs.self.hydraJobs; [ packages.x86_64-linux - packages.aarch64-darwin checks.x86_64-linux - checks.aarch64-darwin ]); meta.description = "Required CI builds"; }; From 4ffa491fef21488cac396c894c87c77963b77424 Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Wed, 15 Mar 2023 16:53:48 +0000 Subject: [PATCH 03/11] chore: Remove cabal-fmt, doesn't like GHC 9.6.1. --- flake.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/flake.nix b/flake.nix index dfb757bfd..ca7829fab 100644 --- a/flake.nix +++ b/flake.nix @@ -183,7 +183,6 @@ haskellNixTools = pkgs.haskell-nix.tools ghcVersion { hlint = "latest"; fourmolu = fourmoluVersion; - cabal-fmt = "latest"; }; in { @@ -193,7 +192,6 @@ hooks = { hlint.enable = true; fourmolu.enable = true; - cabal-fmt.enable = true; nixpkgs-fmt.enable = true; actionlint = { @@ -212,7 +210,6 @@ nixpkgs-fmt = pkgs.lib.mkForce pkgs.nixpkgs-fmt; hlint = pkgs.lib.mkForce haskellNixTools.hlint; fourmolu = pkgs.lib.mkForce haskellNixTools.fourmolu; - cabal-fmt = pkgs.lib.mkForce haskellNixTools.cabal-fmt; }; excludes = [ @@ -506,8 +503,6 @@ fourmolu = fourmoluVersion; - cabal-fmt = "latest"; - #TODO Explicitly requiring tasty-discover shouldn't be necessary - see the commented-out `build-tool-depends` in primer.cabal. tasty-discover = "latest"; }; From 9892d1a2c1258e913b0f431e4531dbfda516f182 Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Wed, 15 Mar 2023 16:55:35 +0000 Subject: [PATCH 04/11] chore: Remove fourmolu, doesn't like GHC 9.6.1. --- flake.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/flake.nix b/flake.nix index ca7829fab..c5443edee 100644 --- a/flake.nix +++ b/flake.nix @@ -182,7 +182,6 @@ # we're using. haskellNixTools = pkgs.haskell-nix.tools ghcVersion { hlint = "latest"; - fourmolu = fourmoluVersion; }; in { @@ -191,7 +190,6 @@ src = ./.; hooks = { hlint.enable = true; - fourmolu.enable = true; nixpkgs-fmt.enable = true; actionlint = { @@ -209,7 +207,6 @@ tools = { nixpkgs-fmt = pkgs.lib.mkForce pkgs.nixpkgs-fmt; hlint = pkgs.lib.mkForce haskellNixTools.hlint; - fourmolu = pkgs.lib.mkForce haskellNixTools.fourmolu; }; excludes = [ @@ -501,8 +498,6 @@ hlint = "latest"; weeder = weederVersion; - fourmolu = fourmoluVersion; - #TODO Explicitly requiring tasty-discover shouldn't be necessary - see the commented-out `build-tool-depends` in primer.cabal. tasty-discover = "latest"; }; From 76bd37766d1cb260d674329af5d5b49356c3178f Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Wed, 15 Mar 2023 17:23:49 +0000 Subject: [PATCH 05/11] chore: Remove hlint, doesn't like GHC 9.6.1. --- flake.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index c5443edee..ada8fbaf2 100644 --- a/flake.nix +++ b/flake.nix @@ -180,16 +180,13 @@ let # Override the default nix-pre-commit-hooks tools with the version # we're using. - haskellNixTools = pkgs.haskell-nix.tools ghcVersion { - hlint = "latest"; - }; + haskellNixTools = pkgs.haskell-nix.tools ghcVersion { }; in { check.enable = true; settings = { src = ./.; hooks = { - hlint.enable = true; nixpkgs-fmt.enable = true; actionlint = { @@ -206,7 +203,6 @@ # https://github.com/cachix/pre-commit-hooks.nix/issues/204 tools = { nixpkgs-fmt = pkgs.lib.mkForce pkgs.nixpkgs-fmt; - hlint = pkgs.lib.mkForce haskellNixTools.hlint; }; excludes = [ @@ -495,7 +491,6 @@ implicit-hie = "latest"; cabal = "latest"; - hlint = "latest"; weeder = weederVersion; #TODO Explicitly requiring tasty-discover shouldn't be necessary - see the commented-out `build-tool-depends` in primer.cabal. From 8084549a955f6b7944ac0c1db5ac41ad5608d8c2 Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Wed, 15 Mar 2023 17:26:22 +0000 Subject: [PATCH 06/11] chore: Remove weeder, doesn't like GHC 9.6.1. --- flake.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index ada8fbaf2..89fc1824f 100644 --- a/flake.nix +++ b/flake.nix @@ -247,7 +247,7 @@ // primerFlake.packages; checks = { - inherit weeder openapi-validate; + inherit openapi-validate; inherit primer-sqitch-test-sqlite; } @@ -491,7 +491,6 @@ implicit-hie = "latest"; cabal = "latest"; - weeder = weederVersion; #TODO Explicitly requiring tasty-discover shouldn't be necessary - see the commented-out `build-tool-depends` in primer.cabal. tasty-discover = "latest"; From 71b0d4f9edfb8ca735cf3037f98fe2b7c7af430a Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Wed, 15 Mar 2023 17:31:28 +0000 Subject: [PATCH 07/11] chore: Just remove all the shell tools, none of them work --- flake.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/flake.nix b/flake.nix index 89fc1824f..d34cc5243 100644 --- a/flake.nix +++ b/flake.nix @@ -486,10 +486,6 @@ withHoogle = true; tools = { - ghcid = "latest"; - haskell-language-server = "latest"; - implicit-hie = "latest"; - cabal = "latest"; #TODO Explicitly requiring tasty-discover shouldn't be necessary - see the commented-out `build-tool-depends` in primer.cabal. From 41fa978dcd763e21cf208632c48b801bfbfaa0e6 Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Thu, 16 Mar 2023 09:48:08 +0000 Subject: [PATCH 08/11] Revert "chore: Disable aarch64-darwin during GHC 9.6.1 bring-up." This reverts commit 77fd997a0471622e8163aa6cc8ccb6b6d27d379b. Re-enable aarch64-darwin. --- flake.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index d34cc5243..a190e5256 100644 --- a/flake.nix +++ b/flake.nix @@ -62,7 +62,7 @@ inputs.pre-commit-hooks-nix.flakeModule ./nix/flake-parts/benchmarks.nix ]; - systems = [ "x86_64-linux" ]; + systems = [ "x86_64-linux" "aarch64-darwin" ]; perSystem = { config, pkgs, system, ... }: let @@ -717,7 +717,9 @@ name = "required-ci"; constituents = builtins.map builtins.attrValues (with inputs.self.hydraJobs; [ packages.x86_64-linux + packages.aarch64-darwin checks.x86_64-linux + checks.aarch64-darwin ]); meta.description = "Required CI builds"; }; From a8b9657247269149f44d485c81d1ba9a9b71f8e9 Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Thu, 16 Mar 2023 10:01:31 +0000 Subject: [PATCH 09/11] Revert "Revert "chore: Disable aarch64-darwin during GHC 9.6.1 bring-up."" This reverts commit 21e7bef47f1f19a2780dd3546e6f9f5562b36208. aarch64-darwin still not working. --- flake.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index a190e5256..d34cc5243 100644 --- a/flake.nix +++ b/flake.nix @@ -62,7 +62,7 @@ inputs.pre-commit-hooks-nix.flakeModule ./nix/flake-parts/benchmarks.nix ]; - systems = [ "x86_64-linux" "aarch64-darwin" ]; + systems = [ "x86_64-linux" ]; perSystem = { config, pkgs, system, ... }: let @@ -717,9 +717,7 @@ name = "required-ci"; constituents = builtins.map builtins.attrValues (with inputs.self.hydraJobs; [ packages.x86_64-linux - packages.aarch64-darwin checks.x86_64-linux - checks.aarch64-darwin ]); meta.description = "Required CI builds"; }; From 3029d00cd0a785936330c4ba44a4b88756d22189 Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Sat, 18 Mar 2023 03:28:11 +0000 Subject: [PATCH 10/11] Revert "Revert "Revert "chore: Disable aarch64-darwin during GHC 9.6.1 bring-up.""" This reverts commit a8b9657247269149f44d485c81d1ba9a9b71f8e9. Should be working again. --- flake.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index d34cc5243..a190e5256 100644 --- a/flake.nix +++ b/flake.nix @@ -62,7 +62,7 @@ inputs.pre-commit-hooks-nix.flakeModule ./nix/flake-parts/benchmarks.nix ]; - systems = [ "x86_64-linux" ]; + systems = [ "x86_64-linux" "aarch64-darwin" ]; perSystem = { config, pkgs, system, ... }: let @@ -717,7 +717,9 @@ name = "required-ci"; constituents = builtins.map builtins.attrValues (with inputs.self.hydraJobs; [ packages.x86_64-linux + packages.aarch64-darwin checks.x86_64-linux + checks.aarch64-darwin ]); meta.description = "Required CI builds"; }; From f170894e4176665c7a8862347dc0e4d9fc51fbdb Mon Sep 17 00:00:00 2001 From: Ben Price Date: Mon, 20 Mar 2023 16:35:14 +0000 Subject: [PATCH 11/11] temporary workaround for logging-effect+ghc-9.6 --- cabal.project | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cabal.project b/cabal.project index 8818dd442..f4191983f 100644 --- a/cabal.project +++ b/cabal.project @@ -36,3 +36,10 @@ source-repository-package tag: ab9619db13b93867d1a244441bb4de03d3e1dadb subdir: selda-sqlite --sha256: 0rdpazkhx6wfxlf6izg9xzxjr9wqywzqmk0c2a23qyfvih0ylj9z + +-- https://github.com/ocharles/logging-effect/issues/37 +source-repository-package + type: git + location: https://github.com/brprice/logging-effect + tag: de60d39a0cbc7b450f4efdf32bb6dd886b2a87db + --sha256: 12d1yq4493mg9128zbyl62vsqwjxcsrr9vhlphriq9a18lamgsa6