From 53089697cd5c238675af7e15a54d75ba75c445e7 Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Mon, 7 Feb 2022 11:10:25 +0000 Subject: [PATCH] chore(ghc): Upgrade to GHC 9.2.2. We must also bump Weeder to 2.3.0, as it tracks GHC closely. Note that this commit includes workarounds for packages that are not yet ready for GHC 9.2: * protolude: ignore bounds. --- cabal.ghcjs.project | 2 +- cabal.project | 36 +++-- flake.lock | 196 +++++++++++++++++++--------- flake.nix | 46 ++++++- primer-service/primer-service.cabal | 2 +- primer/primer.cabal | 2 +- 6 files changed, 207 insertions(+), 77 deletions(-) diff --git a/cabal.ghcjs.project b/cabal.ghcjs.project index 6a5a6dbe0..63c68c970 100644 --- a/cabal.ghcjs.project +++ b/cabal.ghcjs.project @@ -1,4 +1,4 @@ -index-state: 2022-02-26T00:00:00Z +index-state: 2022-04-09T00:00:00Z packages: primer diff --git a/cabal.project b/cabal.project index 98ea2b1d0..3405f9561 100644 --- a/cabal.project +++ b/cabal.project @@ -1,4 +1,4 @@ -index-state: 2022-02-26T00:00:00Z +index-state: 2022-04-09T00:00:00Z packages: primer @@ -13,21 +13,31 @@ package * package primer test-options: "--size-cutoff=32768" --- GHC 9.2.1 fixes +-- https://github.com/protolude/protolude/issues/127 +allow-newer: + protolude:* + +-- GHC 9.2.x fixes -- https://github.com/vincenthz/hs-memory/issues/86 -- https://github.com/haskell-infra/hackage-trustees/issues/330#issuecomment-1019507291 -source-repository-package - type: git - location: https://github.com/tfausak/hs-memory - tag: 3cf661a - --sha256: 06y4xyigajhdcd59dgwasv49yr95869q3p74a441yls5vb86v28c +-- source-repository-package +-- type: git +-- location: https://github.com/tfausak/hs-memory +-- tag: 3cf661a +-- --sha256: 06y4xyigajhdcd59dgwasv49yr95869q3p74a441yls5vb86v28c -- https://github.com/haskell-foundation/foundation/pull/555 +-- source-repository-package +-- type: git +-- location: https://github.com/TomMD/foundation +-- tag: 0bb195e +-- subdir: foundation basement +-- --sha256: 1rwy3qxrf8zxycfksidwrffqbazacchqx19w5q1rvdvh7ab6wd75 + +-- https://github.com/protolude/protolude/issues/127 source-repository-package - type: git - location: https://github.com/TomMD/foundation - tag: 0bb195e - subdir: foundation basement - --sha256: 1rwy3qxrf8zxycfksidwrffqbazacchqx19w5q1rvdvh7ab6wd75 - + type: git + location: https://github.com/protolude/protolude + tag: 3e249724fd0ead27370c8c297b1ecd38f92cbd5b + --sha256: sha256-JyHAQfTTUswP8MeGEZibx/2/v01Q7cU5mNpnmDazh24= diff --git a/flake.lock b/flake.lock index de0c6916e..ff9f44687 100644 --- a/flake.lock +++ b/flake.lock @@ -85,11 +85,11 @@ }, "emacs-overlay": { "locked": { - "lastModified": 1646414475, - "narHash": "sha256-Linz0Q0FaNYkHniXnlUdCYUI9qeHvcS/dbn13Q3w4Bg=", + "lastModified": 1648407092, + "narHash": "sha256-FtSCZSrFI8GWMXMPXo35SqoSzjDyPBGtSspDCntmVu0=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "2fc6f185dbbc0dbf35289648aab0a8dfd1bba320", + "rev": "fdafbede17265f56e3df5382442a8c41069e0994", "type": "github" }, "original": { @@ -101,11 +101,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1641205782, - "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "lastModified": 1648199409, + "narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=", "owner": "edolstra", "repo": "flake-compat", - "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", + "rev": "64a525ee38886ab9028e6f61790de0832aa3ef03", "type": "github" }, "original": { @@ -117,11 +117,11 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1641205782, - "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "lastModified": 1648199409, + "narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=", "owner": "edolstra", "repo": "flake-compat", - "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", + "rev": "64a525ee38886ab9028e6f61790de0832aa3ef03", "type": "github" }, "original": { @@ -132,11 +132,11 @@ }, "flake-utils": { "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "lastModified": 1648297722, + "narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade", "type": "github" }, "original": { @@ -147,11 +147,11 @@ }, "flake-utils_2": { "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "lastModified": 1648297722, + "narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade", "type": "github" }, "original": { @@ -195,11 +195,11 @@ "gitignore-nix": { "flake": false, "locked": { - "lastModified": 1635165013, - "narHash": "sha256-o/BdVjNwcB6jOmzZjOH703BesSkkS5O7ej3xhyO8hAY=", + "lastModified": 1646480205, + "narHash": "sha256-kekOlTlu45vuK2L9nq8iVN17V3sB0WWPqTTW3a2SQG0=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "5b9e0ff9d3b551234b4f3eb3983744fa354b17f1", + "rev": "bff2832ec341cf30acb3a4d3e2e7f1f7b590116a", "type": "github" }, "original": { @@ -211,11 +211,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1647047557, - "narHash": "sha256-6A7jjz77f53GkvFxqVmeuqqXyDWsU24rUtFtOg68CAg=", + "lastModified": 1649466757, + "narHash": "sha256-LD7tqvElXwxgTtSrM040zq8b6Re88uO6PatbvCgQDlA=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "fc07d4d4f2597334caa96f455cec190bdcc931f4", + "rev": "c8f5962d12ea8596602ef86143702c2045e0fc18", "type": "github" }, "original": { @@ -235,11 +235,11 @@ "sops-nix": "sops-nix" }, "locked": { - "lastModified": 1646435980, - "narHash": "sha256-xi9g5ikx2GcHHhF+xUEZx4wLQHDHBmLDVYQNtsOLbK8=", + "lastModified": 1648422705, + "narHash": "sha256-Xmm3OEWbDOSX5yRGFWUpNd0RONUJsEuJsupa3Ku5ThA=", "owner": "hackworthltd", "repo": "hacknix", - "rev": "e41e33f62534d07faf954b0acdd1e7ef665d4893", + "rev": "ca6df3329a6463ce67ad021b9366ad5ba36e54e9", "type": "github" }, "original": { @@ -259,6 +259,7 @@ "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", "hackage": "hackage", "hpc-coveralls": "hpc-coveralls", + "hydra": "hydra", "nix-tools": "nix-tools", "nixpkgs": [ "haskell-nix", @@ -272,11 +273,11 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1647047689, - "narHash": "sha256-fc/LNt690YkBXYUqp18dEAuxGrg7WdHQv5i7DeEWKIo=", + "lastModified": 1649466925, + "narHash": "sha256-oswur2yobKrlKOMuTNw2hvUzV7bYhv80dUSVvHqHuN0=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "f09a6c87a5e00e43312d717e094fd77899bd129f", + "rev": "9837fdee76409c1150f8911fb59adee614e3a837", "type": "github" }, "original": { @@ -301,6 +302,66 @@ "type": "github" } }, + "hydra": { + "inputs": { + "nix": "nix", + "nixpkgs": [ + "haskell-nix", + "hydra", + "nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1646878427, + "narHash": "sha256-KtbrofMtN8GlM7D+n90kixr7QpSlVmdN+vK5CA/aRzc=", + "owner": "NixOS", + "repo": "hydra", + "rev": "28b682b85b7efc5cf7974065792a1f22203a5927", + "type": "github" + }, + "original": { + "id": "hydra", + "type": "indirect" + } + }, + "lowdown-src": { + "flake": false, + "locked": { + "lastModified": 1633514407, + "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", + "type": "github" + }, + "original": { + "owner": "kristapsdz", + "repo": "lowdown", + "type": "github" + } + }, + "nix": { + "inputs": { + "lowdown-src": "lowdown-src", + "nixpkgs": "nixpkgs_3", + "nixpkgs-regression": "nixpkgs-regression" + }, + "locked": { + "lastModified": 1643066034, + "narHash": "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg=", + "owner": "NixOS", + "repo": "nix", + "rev": "a1cd7e58606a41fcf62bf8637804cf8306f17f62", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "2.6.0", + "repo": "nix", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": "nixpkgs" @@ -323,11 +384,11 @@ "nix-tools": { "flake": false, "locked": { - "lastModified": 1644395812, - "narHash": "sha256-BVFk/BEsTLq5MMZvdy3ZYHKfaS3dHrsKh4+tb5t5b58=", + "lastModified": 1649424170, + "narHash": "sha256-XgKXWispvv5RCvZzPb+p7e6Hy3LMuRjafKMl7kXzxGw=", "owner": "input-output-hk", "repo": "nix-tools", - "rev": "d847c63b99bbec78bf83be2a61dc9f09b8a9ccc1", + "rev": "e109c94016e3b6e0db7ed413c793e2d4bdb24aa7", "type": "github" }, "original": { @@ -368,11 +429,11 @@ }, "nixpkgs-2105": { "locked": { - "lastModified": 1642244250, - "narHash": "sha256-vWpUEqQdVP4srj+/YLJRTN9vjpTs4je0cdWKXPbDItc=", + "lastModified": 1645296114, + "narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0fd9ee1aa36ce865ad273f4f07fdc093adeb5c00", + "rev": "530a53dcbc9437363471167a5e4762c5fcfa34a1", "type": "github" }, "original": { @@ -384,11 +445,11 @@ }, "nixpkgs-2111": { "locked": { - "lastModified": 1644510859, - "narHash": "sha256-xjpVvL5ecbyi0vxtVl/Fh9bwGlMbw3S06zE5nUzFB8A=", + "lastModified": 1648744337, + "narHash": "sha256-bYe1dFJAXovjqiaPKrmAbSBEK5KUkgwVaZcTbSoJ7hg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0d1d5d7e3679fec9d07f2eb804d9f9fdb98378d3", + "rev": "0a58eebd8ec65ffdef2ce9562784123a73922052", "type": "github" }, "original": { @@ -398,13 +459,28 @@ "type": "github" } }, + "nixpkgs-regression": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "indirect" + } + }, "nixpkgs-unstable": { "locked": { - "lastModified": 1644486793, - "narHash": "sha256-EeijR4guVHgVv+JpOX3cQO+1XdrkJfGmiJ9XVsVU530=", + "lastModified": 1648219316, + "narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1882c6b7368fd284ad01b0a5b5601ef136321292", + "rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634", "type": "github" }, "original": { @@ -416,11 +492,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1646331602, - "narHash": "sha256-cRuytTfel52z947yKfJcZU7zbQBgM16qqTf+oJkVwtg=", + "lastModified": 1648219316, + "narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ad267cc9cf3d5a6ae63940df31eb31382d6356e6", + "rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634", "type": "github" }, "original": { @@ -432,18 +508,17 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1646955661, - "narHash": "sha256-AYLta1PubJnrkv15+7G+6ErW5m9NcI9wSdJ+n7pKAe0=", + "lastModified": 1632864508, + "narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e9545762b032559c27d8ec9141ed63ceca1aa1ac", + "rev": "82891b5e2c2359d7e58d08849e4c89511ab94234", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "id": "nixpkgs", + "ref": "nixos-21.05-small", + "type": "indirect" } }, "old-ghc-nix": { @@ -473,11 +548,11 @@ ] }, "locked": { - "lastModified": 1646153636, - "narHash": "sha256-AlWHMzK+xJ1mG267FdT8dCq/HvLCA6jwmx2ZUy5O8tY=", + "lastModified": 1649054408, + "narHash": "sha256-wz8AH7orqUE4Xog29WMTqOYBs0DMj2wFM8ulrTRVgz0=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "b6bc0b21e1617e2b07d8205e7fae7224036dfa4b", + "rev": "e5e7b3b542e7f4f96967966a943d7e1c07558042", "type": "github" }, "original": { @@ -501,14 +576,17 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": [ + "hacknix", + "nixpkgs" + ] }, "locked": { - "lastModified": 1645891244, - "narHash": "sha256-Pu3a97Zn0PpWi/prTyD9TulCmxyeVnlqofor+yScRD8=", + "lastModified": 1647279403, + "narHash": "sha256-ZsHfMah9+TElcjaENsaOIFHBNNtSbXmyLFVbiJiAECs=", "owner": "Mic92", "repo": "sops-nix", - "rev": "afb0d686dced029ea720c466f693c12ebfd4107b", + "rev": "c01f48b055ac776f9831c9d4a0fff83e3b74dbe3", "type": "github" }, "original": { @@ -520,11 +598,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1646961451, - "narHash": "sha256-fs3+CsqzgNVT2mJSJOc+MnhbRoIoB/L1ZEhiJn0nXHQ=", + "lastModified": 1649466862, + "narHash": "sha256-bpgRxiYQAc1HUtR38z/ItSfbw122PbfA4cSOxY98+Fs=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "02b9e7ea7304027b5d473233c2465d04a21a17e3", + "rev": "7da0fac0915b6497e61ea5c65fc9fcff7ea7d869", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 1c72f088e..d054cd5cc 100644 --- a/flake.nix +++ b/flake.nix @@ -47,11 +47,11 @@ in builtins.trace "Nix Primer version is ${v}" v; - ghcVersion = "ghc8107"; + ghcVersion = "ghc922"; # We must keep the weeder version in sync with the version of # GHC we're using. - weederVersion = "2.2.0"; + weederVersion = "2.3.0"; forAllSupportedSystems = flake-utils.lib.eachSystem [ "x86_64-linux" @@ -125,6 +125,48 @@ compiler-nix-name = ghcVersion; src = ./.; modules = [ + # https://github.com/input-output-hk/haskell.nix/issues/1177 + { + nonReinstallablePkgs = [ + "rts" + "ghc-heap" + "ghc-prim" + "integer-gmp" + "integer-simple" + "base" + "deepseq" + "array" + "ghc-boot-th" + "pretty" + "template-haskell" + "ghc-bignum" + "exceptions" + "stm" + "ghc-boot" + "ghc" + "Cabal" + "Win32" + "array" + "binary" + "bytestring" + "containers" + "directory" + "filepath" + "ghc-boot" + "ghc-compact" + "ghc-prim" + "hpc" + "mtl" + "parsec" + "process" + "text" + "time" + "transformers" + "unix" + "xhtml" + "terminfo" + ]; + } { # We want -Werror for Nix builds (primarily for CI). packages = { diff --git a/primer-service/primer-service.cabal b/primer-service/primer-service.cabal index 88c5ad7f8..55429ed5a 100644 --- a/primer-service/primer-service.cabal +++ b/primer-service/primer-service.cabal @@ -55,7 +55,7 @@ library , stm-containers >=1.1 && <=1.3 , streaming-commons ^>=0.2.2.4 , text >=1.2.3.2 && <=1.3 - , transformers >=0.5.6.2 && <=0.6 + , transformers >=0.5.6.2 && <=0.7 , uuid ^>=1.3 , wai ^>=3.2 , wai-app-static ^>=3.1 diff --git a/primer/primer.cabal b/primer/primer.cabal index fbe57708e..1b7b85713 100644 --- a/primer/primer.cabal +++ b/primer/primer.cabal @@ -155,7 +155,7 @@ test-suite primer-test , hedgehog-classes ^>=0.2.5.3 , hspec ^>=2.9.4 , hspec-megaparsec ^>=2.2.0 - , mmorph ^>=1.1.5 + , mmorph ^>=1.2.0 , mtl , optics , pretty-simple ^>=4.0.0