From fab56cdf075b22df9e1979ec717f8bd244252f66 Mon Sep 17 00:00:00 2001 From: Guillaume Bouchard Date: Wed, 25 Oct 2023 13:53:40 +0400 Subject: [PATCH] fix: small changes for GHC 9.8 --- .github/workflows/master.yml | 6 +++++- ChangeLog.md | 4 ++++ PyF.cabal | 10 +++++----- flake.lock | 13 ++++++------- flake.nix | 25 +++++++++++++++++-------- 5 files changed, 37 insertions(+), 21 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index fda4e52..4bc1f91 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -31,8 +31,12 @@ jobs: run: sudo apt-get install haskell-stack # Build stack + - name: Stack 9.6 + run: stack --resolver nightly-2023-10-24 test + - name: Stack 9.4 + run: stack --resolver lts-21.17 test - name: Stack 9.2 - run: stack --resolver nightly-2022-03-28 test + run: stack --resolver lts-20.26 test - name: Stack 9.0 run: stack --resolver lts-19.1 test - name: Stack 8.10 diff --git a/ChangeLog.md b/ChangeLog.md index 554ea1a..913c4dd 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,9 @@ # Revision history for PyF +## 0.11.2.1 + +- Final version for GHC 9.8 + ## 0.11.2.0 - Fix for the neovim treesitter syntax highlighter for `fmt` and `fmtTrim` quasiquotes diff --git a/PyF.cabal b/PyF.cabal index bd91746..93d2329 100644 --- a/PyF.cabal +++ b/PyF.cabal @@ -27,11 +27,11 @@ library PyF.Internal.ParserEx PyF.Internal.Parser - build-depends: base >= 4.12 && < 4.19 - , bytestring >= 0.10.8 && < 0.12 - , template-haskell >= 2.14.0 && < 2.21 - , text >= 1.2.3 && <= 2.1 - , time >= 1.8.0 && < 1.13 + build-depends: base >= 4.12 && < 4.20 + , bytestring >= 0.10.8 && < 0.13 + , template-haskell >= 2.14.0 && < 2.22 + , text >= 1.2.3 && < 2.2 + , time >= 1.8.0 && < 1.14 , parsec >= 3.1.13 && < 3.2 , mtl >= 2.2.2 && < 2.4 , ghc >= 8.6.1 diff --git a/flake.lock b/flake.lock index bb23cb9..eee7723 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "owner": "numtide", "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "type": "github" }, "original": { @@ -20,16 +20,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1690762399, - "narHash": "sha256-zTDOd+SC7/Nm/8rwhvbKrhgoTVfw0zTusQNxr38di98=", + "lastModified": 1698226488, + "narHash": "sha256-DdmQFlDZfRnXkW1VRa3J5bzmDgtRWZ9NU44fN66CbIA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "649fc12ad662150d8ba7f629a445013ac2a465aa", + "rev": "be5c30bf2c89ccfd6e2d8ebba54c25d7c0c80764", "type": "github" }, "original": { "owner": "nixos", - "ref": "haskell-updates", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 8acd827..6368396 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "PyF"; inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.nixpkgs.url = "github:nixos/nixpkgs/haskell-updates"; + inputs.nixpkgs.url = "github:nixos/nixpkgs"; # Broken: see https://github.com/NixOS/nix/issues/5621 #nixConfig.allow-import-from-derivation = true; @@ -82,7 +82,10 @@ # The current version for debug pyf_current = pyfBuilder (haskellPackages.override { - overrides = self: super: with haskell.lib; rec { }; + overrides = self: super: with haskell.lib; rec { + hls-floskell-plugin = doJailbreak super.hls-floskell-plugin; + hls-formolu-plugin = doJailbreak super.hls-formolu-plugin; + }; }); # GHC 9.4 @@ -97,17 +100,20 @@ }; }); - pyf_98 = pyfBuilder ((haskell.packages.ghcHEAD.override { + pyf_98 = pyfBuilder ((haskell.packages.ghc98.override { overrides = self: super: with haskell.lib; { # Bump hspec (and dependencies) - hspec-core = super.callHackage "hspec-core" "2.11.4" {}; - hspec-meta = super.callHackage "hspec-meta" "2.11.4" {}; - hspec = super.callHackage "hspec" "2.11.4" {}; - hspec-discover = super.callHackage "hspec-discover" "2.11.4" {}; + hspec-core = super.callHackage "hspec-core" "2.11.6" {}; + hspec-meta = super.callHackage "hspec-meta" "2.11.6" {}; + hspec = super.callHackage "hspec" "2.11.6" {}; + hspec-discover = super.callHackage "hspec-discover" "2.11.6" {}; hspec-expectations = super.callHackage "hspec-expectations" "0.8.4" {}; + tagged = doJailbreak super.tagged; + # Disabling tests breaks the loop with hspec base-orphans = dontCheck super.base-orphans; + splitmix = doJailbreak super.splitmix; }; })); @@ -120,7 +126,10 @@ pyf_92 pyf_94 pyf_96 - pyf_98 + + # Nix build of the different component for testing in 98 are not working + # But building with cabal works + # pyf_98 ]; # Only the current build is built with python3 support