From 4fb91756bfd32c12864a8c5cc6b2c015770410eb Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Wed, 27 Dec 2023 10:26:19 +0100 Subject: [PATCH] Remove GHC9.2 from CI. Use GHC 9.6.3 as default. --- .github/workflows/github-page.yml | 6 +- .github/workflows/haskell.yml | 6 +- flake.lock | 119 +++++++++++++++++++++--------- flake.nix | 36 +++++---- 4 files changed, 112 insertions(+), 55 deletions(-) diff --git a/.github/workflows/github-page.yml b/.github/workflows/github-page.yml index 7d7471420a..bd1d2558a1 100644 --- a/.github/workflows/github-page.yml +++ b/.github/workflows/github-page.yml @@ -32,17 +32,17 @@ jobs: - name: Fetch nix cache and update cabal indices run: | - nix develop .\#ghc962 --command \ + nix develop .\#haddockShell --command \ cabal update - name: Build whole project run: | - nix develop .\#ghc962 --command \ + nix develop .\#haddockShell --command \ cabal build all - name: Build documentation run: | - nix develop .\#ghc962 --command \ + nix develop .\#haddockShell --command \ cabal haddock-project --local --output=./haddocks --internal --foreign-libraries - name: Compress haddocks diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 31223716fb..88e98cf368 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -11,13 +11,13 @@ jobs: strategy: fail-fast: false matrix: - ghc: ["8.10.7", "9.6.2"] - cabal: ["3.10.1.0"] + ghc: ["8.10.7", "9.6.4"] + cabal: ["3.10.2.0"] os: [ubuntu-latest, macos-latest, windows-latest] env: # Modify this value to "invalidate" the cabal cache. - CABAL_CACHE_VERSION: "2024-01-16" + CABAL_CACHE_VERSION: "2024-01-24" concurrency: group: > diff --git a/flake.lock b/flake.lock index 7ad4ba0a7f..5ab482de8a 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1702906471, - "narHash": "sha256-br+hVo3R6nfmiSEPXcLKhIX4Kg5gcK2PjzjmvQsuUp8=", + "lastModified": 1706004183, + "narHash": "sha256-WKfiLsitgXL9wxHr8LA+lyIhHXog4/HOOdQwIUdSW04=", "owner": "intersectmbo", "repo": "cardano-haskell-packages", - "rev": "48a359ac3f1d437ebaa91126b20e15a65201f004", + "rev": "44cf7d3dcee77eb6ee8e4462bf63616351dfbb1d", "type": "github" }, "original": { @@ -136,11 +136,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -224,11 +224,11 @@ "ghc99": { "flake": false, "locked": { - "lastModified": 1697054644, - "narHash": "sha256-kKarOuXUaAH3QWv7ASx+gGFMHaHKe0pK5Zu37ky2AL4=", + "lastModified": 1701580282, + "narHash": "sha256-drA01r3JrXnkKyzI+owMZGxX0JameMzjK0W5jJE/+V4=", "ref": "refs/heads/master", - "rev": "f383a242c76f90bcca8a4d7ee001dcb49c172a9a", - "revCount": 62040, + "rev": "f5eb0f2982e9cf27515e892c4bdf634bcfb28459", + "revCount": 62197, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" @@ -242,11 +242,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1706055829, - "narHash": "sha256-4bIOyE4CSPij2j+bo/kLlnHojkfFqQMVpN3xnQ5reiA=", + "lastModified": 1706142242, + "narHash": "sha256-fofDg1MAgN0yF46D0LfYnYEZctuTAmeYEmMV+u0FHOc=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "c9889ce77afa9fd20d6845808c83da11efbe8e48", + "rev": "c9ccd30f487a962c18137ad35ed40bc1719da209", "type": "github" }, "original": { @@ -272,6 +272,8 @@ "hls-2.2": "hls-2.2", "hls-2.3": "hls-2.3", "hls-2.4": "hls-2.4", + "hls-2.5": "hls-2.5", + "hls-2.6": "hls-2.6", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", "iserv-proxy": "iserv-proxy", @@ -285,16 +287,17 @@ "nixpkgs-2205": "nixpkgs-2205", "nixpkgs-2211": "nixpkgs-2211", "nixpkgs-2305": "nixpkgs-2305", + "nixpkgs-2311": "nixpkgs-2311", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", "stackage": "stackage" }, "locked": { - "lastModified": 1700009422, - "narHash": "sha256-dC61gAwIdAdvM0aQaDS0cyGLftPahBA2/5dFleZ94aE=", + "lastModified": 1706143809, + "narHash": "sha256-lYjy5qAdLvm+0PWjRLHEe1Gl+PwoYRm5SpgXGLBaLKk=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "711f9f20e4bfa7105c5ce0129b3586778068e568", + "rev": "5559d7bc4ad00bada614d1c4473d5cf38eb905f2", "type": "github" }, "original": { @@ -374,16 +377,50 @@ "hls-2.4": { "flake": false, "locked": { - "lastModified": 1696939266, - "narHash": "sha256-VOMf5+kyOeOmfXTHlv4LNFJuDGa7G3pDnOxtzYR40IU=", + "lastModified": 1699862708, + "narHash": "sha256-YHXSkdz53zd0fYGIYOgLt6HrA0eaRJi9mXVqDgmvrjk=", "owner": "haskell", "repo": "haskell-language-server", - "rev": "362fdd1293efb4b82410b676ab1273479f6d17ee", + "rev": "54507ef7e85fa8e9d0eb9a669832a3287ffccd57", "type": "github" }, "original": { "owner": "haskell", - "ref": "2.4.0.0", + "ref": "2.4.0.1", + "repo": "haskell-language-server", + "type": "github" + } + }, + "hls-2.5": { + "flake": false, + "locked": { + "lastModified": 1701080174, + "narHash": "sha256-fyiR9TaHGJIIR0UmcCb73Xv9TJq3ht2ioxQ2mT7kVdc=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "27f8c3d3892e38edaef5bea3870161815c4d014c", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.5.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, + "hls-2.6": { + "flake": false, + "locked": { + "lastModified": 1705325287, + "narHash": "sha256-+P87oLdlPyMw8Mgoul7HMWdEvWP/fNlo8jyNtwME8E8=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "6e0b342fa0327e628610f2711f8c3e4eaaa08b1e", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.6.0.0", "repo": "haskell-language-server", "type": "github" } @@ -435,11 +472,11 @@ "sodium": "sodium" }, "locked": { - "lastModified": 1691469905, - "narHash": "sha256-TV0p1dFGYAMl1dLJEfe/tNFjxvV2H7VgHU1I43q+b84=", + "lastModified": 1702362799, + "narHash": "sha256-cU8cZXNuo5GRwrSvWqdaqoW5tJ2HWwDEOvWwIVPDPmo=", "owner": "input-output-hk", "repo": "iohk-nix", - "rev": "2f3760f135616ebc477d3ed74eba9b63c22f83a0", + "rev": "b426fb9e0b109a9d1dd2e1476f9e0bd8bb715142", "type": "github" }, "original": { @@ -600,11 +637,11 @@ }, "nixpkgs-2305": { "locked": { - "lastModified": 1695416179, - "narHash": "sha256-610o1+pwbSu+QuF3GE0NU5xQdTHM3t9wyYhB9l94Cd8=", + "lastModified": 1701362232, + "narHash": "sha256-GVdzxL0lhEadqs3hfRLuj+L1OJFGiL/L7gCcelgBlsw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "715d72e967ec1dd5ecc71290ee072bcaf5181ed6", + "rev": "d2332963662edffacfddfad59ff4f709dde80ffe", "type": "github" }, "original": { @@ -614,6 +651,22 @@ "type": "github" } }, + "nixpkgs-2311": { + "locked": { + "lastModified": 1701386440, + "narHash": "sha256-xI0uQ9E7JbmEy/v8kR9ZQan6389rHug+zOtZeZFiDJk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "293822e55ec1872f715a66d0eda9e592dc14419f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-23.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -632,17 +685,17 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1695318763, - "narHash": "sha256-FHVPDRP2AfvsxAdc+AsgFJevMz5VBmnZglFUMlxBkcY=", + "lastModified": 1694822471, + "narHash": "sha256-6fSDCj++lZVMZlyqOe9SIOL8tYSBz1bI8acwovRwoX8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e12483116b3b51a185a33a272bf351e357ba9a99", + "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", "repo": "nixpkgs", + "rev": "47585496bcb13fb72e4a90daeea2f434e2501998", "type": "github" } }, @@ -730,11 +783,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1700006966, - "narHash": "sha256-CMaxgsyYGTtZNeLXIud8YgEiqm0gfievAYFAD9dVcAk=", + "lastModified": 1706054996, + "narHash": "sha256-URZYIAVp0Zt0lMr05+1VlDWUZe6C2D+FLBfFfn7Sti4=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "842af7f9bbfd34de8e3b776ea200f93060d53364", + "rev": "2d34cb4a94ed34c0ae200515172fe2bc9cb39ab6", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 930319d741..ff4869b8dd 100644 --- a/flake.nix +++ b/flake.nix @@ -31,7 +31,7 @@ # setup our nixpkgs with the haskell.nix overlays, and the iohk-nix # overlays... nixpkgs = import inputs.nixpkgs { - overlays = with inputs; [ + overlays = [ # iohkNix.overlays.crypto provide libsodium-vrf, libblst and libsecp256k1. inputs.iohkNix.overlays.crypto # haskellNix.overlay can be configured by later overlays, so need to come before them. @@ -45,7 +45,8 @@ inherit (nixpkgs) lib; # see flake `variants` below for alternative compilers - defaultCompiler = "ghc928"; + defaultCompiler = "ghc963"; + haddockShellCompiler = defaultCompiler; # We use cabalProject' to ensure we don't build the plan for # all systems. cabalProject = nixpkgs.haskell-nix.cabalProject' ({config, ...}: { @@ -76,14 +77,14 @@ # tools we want in our shell, from hackage shell.tools = { - cabal = "3.10.1.0"; + cabal = "3.10.2.0"; ghcid = "0.8.8"; } // lib.optionalAttrs (config.compiler-nix-name == defaultCompiler) { # tools that work or should be used only with default compiler - haskell-language-server = "2.0.0.0"; - hlint = "3.5"; - stylish-haskell = "0.14.4.0"; + haskell-language-server = "2.5.0.0"; + hlint = "3.6.1"; + stylish-haskell = "0.14.5.0"; }; # and from nixpkgs or other inputs shell.nativeBuildInputs = with nixpkgs; [ gh jq yq-go ]; @@ -92,6 +93,7 @@ # Skip cross compilers for the shell shell.crossPlatforms = _: []; + # package customizations as needed. Where cabal.project is not # specific enough, or doesn't allow setting these. modules = [ @@ -137,25 +139,27 @@ # This ensure hydra send a status for the required job (even if no change other than commit hash) revision = nixpkgs.writeText "revision" (inputs.self.rev or "dirty"); }; - }; - legacyPackages = rec { + } + // { haddockShell = devShells.haddockShell; }; + legacyPackages = { inherit cabalProject nixpkgs; # also provide hydraJobs through legacyPackages to allow building without system prefix: inherit hydraJobs; }; devShells = let - profillingShell = p: { + profilingShell = p: { # `nix develop .#profiling` (or `.#ghc927.profiling): a shell with profiling enabled profiling = (p.appendModule {modules = [{enableLibraryProfiling = true;}];}).shell; }; in - profillingShell cabalProject - # Additional shells for every GHC version supported by haskell.nix, eg. `nix develop .#ghc927` - // lib.mapAttrs (compiler-nix-name: _: let - p = cabalProject.appendModule {inherit compiler-nix-name;}; - in - p.shell // (profillingShell p)) - nixpkgs.haskell-nix.compiler; + profilingShell cabalProject + # Add GHC 9.6 shell for haddocks + // + { haddockShell = let + p = cabalProject.appendModule {compiler-nix-name = haddockShellCompiler;}; + in + p.shell // (profilingShell p); + }; # formatter used by nix fmt formatter = nixpkgs.alejandra; }