diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 540cb1ed6..89d837283 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,7 +8,7 @@ Add your description here, if it fixes a particular issue please provide a [link - [ ] Commits have useful messages - [ ] New tests are added if needed and existing tests are updated - [ ] Any changes are noted in the [changelog](https://github.com/IntersectMBO/cardano-db-sync/blob/master/db-sync/CHANGELOG.md) -- [ ] Code is formatted with [`fourmolu`](https://github.com/fourmolu/fourmolu) on version 0.10.1.0 (which can be run with `scripts/fourmolize.sh`) +- [ ] Code is formatted with [`fourmolu`](https://github.com/fourmolu/fourmolu) on version 0.16.2.0 (which can be run with `scripts/fourmolize.sh`) - [ ] Self-reviewed the diff # Migrations diff --git a/.github/workflows/check-fourmolu.yml b/.github/workflows/check-fourmolu.yml index c24f77cef..258deafad 100644 --- a/.github/workflows/check-fourmolu.yml +++ b/.github/workflows/check-fourmolu.yml @@ -18,4 +18,4 @@ jobs: - name: Run fourmolu uses: haskell-actions/run-fourmolu@v9 with: - version: "0.10.1.0" + version: "0.16.2.0" diff --git a/.github/workflows/check-hlint.yml b/.github/workflows/check-hlint.yml index b24988e0d..b411e7863 100644 --- a/.github/workflows/check-hlint.yml +++ b/.github/workflows/check-hlint.yml @@ -21,7 +21,7 @@ jobs: - name: Set up HLint uses: rwe/actions-hlint-setup@v1 with: - version: "3.2.7" + version: "3.8" - name: Run HLint uses: rwe/actions-hlint-run@v2 diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 09ead0450..4181ddad5 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -20,7 +20,7 @@ jobs: matrix: os: [ubuntu-latest] # TODO: Add ghc910 when input-output-hk/devx is fixed - compiler-nix-name: [ghc810, ghc96, ghc98] + compiler-nix-name: [ghc96, ghc98] include: # We want a single job, because macOS runners are scarce. - os: macos-latest diff --git a/doc/building-running.md b/doc/building-running.md index 417f12fcc..0020e7149 100644 --- a/doc/building-running.md +++ b/doc/building-running.md @@ -100,7 +100,7 @@ If building locally, to find `cardano-db-sync` executable location use: ``` find . -name cardano-db-sync -executable -type f -./dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-db-sync-12.0.0/build/cardano-db-sync/cardano-db-sync +./dist-newstyle/build/x86_64-linux/ghc-9.6.5/cardano-db-sync-12.0.0/build/cardano-db-sync/cardano-db-sync ``` On macOS `brew install postgresl openssl@1.1` and extend PKG_CONFIG_PATH with diff --git a/doc/installing.md b/doc/installing.md index ecd7f1516..a29baaeb4 100644 --- a/doc/installing.md +++ b/doc/installing.md @@ -11,8 +11,8 @@ This guide assumes you have the following tools: In addition, Cardano DB Sync requires the following software (instructions below): - * [GHC](https://www.haskell.org/ghcup/install/) >= 8.10.7 - * [Cabal](https://www.haskell.org/ghcup/install/) >= 3.10.1.0 + * [GHC](https://www.haskell.org/ghcup/install/) >= 9.6.5 + * [Cabal](https://www.haskell.org/ghcup/install/) >= 3.12.1.0 * [libsodium-vrf](https://github.com/IntersectMBO/libsodium) * [secp256k1](https://github.com/bitcoin-core/secp256k1) * [blst](https://github.com/supranational/blst) @@ -41,10 +41,10 @@ dependencies. Once GHCup is installed, open a new terminal (to get an updated environment) and run: ```bash -ghcup install ghc 8.10.7 -ghcup install cabal 3.10.1.0 -ghcup set ghc 8.10.7 -ghcup set cabal 3.10.1.0 +ghcup install ghc 9.6.5 +ghcup install cabal 3.12.1.0 +ghcup set ghc 9.6.5 +ghcup set cabal 3.12.1.0 ``` Check that you will use the GHCup tools (and not any other installation on the system): @@ -235,7 +235,7 @@ Explicitly set the GHC version that we installed earlier. This avoids defaulting system version of GHC that might be different than the one you have installed. ```bash -echo "with-compiler: ghc-8.10.7" >> cabal.project.local +echo "with-compiler: ghc-9.6.5" >> cabal.project.local ``` macOS installs OpenSSL in a different location than expected by default. If you have diff --git a/flake.nix b/flake.nix index 27de3a8c1..1c8781d38 100644 --- a/flake.nix +++ b/flake.nix @@ -67,19 +67,15 @@ }) (final: prev: { - # HLint 3.2.x requires GHC >= 8.10 && < 9.0 - hlint = final.haskell-nix.tool "ghc8107" "hlint" { - version = "3.2.7"; + hlint = final.haskell-nix.tool "ghc96" "hlint" { + version = "3.8"; }; - # Fourmolu 0.10.x requires GHC >= 9.0 && < 9.6 - fourmolu = final.haskell-nix.tool "ghc928" "fourmolu" { - version = "0.10.1.0"; + fourmolu = final.haskell-nix.tool "ghc96" "fourmolu" { + version = "0.16.2.0"; }; - - # Weeder 2.2.0 requires GHC >= 8.10 && < 9.0 - weeder = final.haskell-nix.tool "ghc8107" "weeder" { - version = "2.2.0"; + weeder = final.haskell-nix.tool "ghc96" "weeder" { + version = "2.9.0"; }; }) @@ -141,10 +137,7 @@ project = (nixpkgs.haskell-nix.cabalProject' ({ config, lib, pkgs, ... }: rec { src = ./.; name = "cardano-db-sync"; - compiler-nix-name = - if system == "x86_64-linux" - then lib.mkDefault "ghc810" - else lib.mkDefault "ghc96"; + compiler-nix-name = lib.mkDefault "ghc96"; flake.variants = let compilers = @@ -168,11 +161,7 @@ shell.tools = { cabal = "latest"; haskell-language-server = { - src = - if config.compiler-nix-name == "ghc8107" then - nixpkgs.haskell-nix.sources."hls-1.10" - else - nixpkgs.haskell-nix.sources."hls-2.9"; + src = nixpkgs.haskell-nix.sources."hls-2.9"; }; }; # Now we use pkgsBuildBuild, to make sure that even in the cross @@ -181,7 +170,7 @@ shell.buildInputs = with nixpkgs.pkgsBuildBuild; [ gitAndTools.git hlint - ] ++ lib.optionals (config.compiler-nix-name == "ghc8107") [ + ] ++ lib.optionals (config.compiler-nix-name == "ghc96") [ # Weeder requires the GHC version to match HIE files weeder ] ++ lib.optionals (system != "aarch64-darwin") [