From 0cff70a95b067fda99d26077f0a74280a76703ab Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 3 Jan 2025 12:47:56 +1300 Subject: [PATCH 01/27] Add GHC 9.12.1 --- ci.nix | 1 + lazy-inputs/default.nix | 1 + lazy-inputs/ghc9121/flake.lock | 30 ++++++++++++++++++++++++++++++ lazy-inputs/ghc9121/flake.nix | 12 ++++++++++++ overlays/bootstrap.nix | 33 +++++++++++++++++++++++++++++++++ 5 files changed, 77 insertions(+) create mode 100644 lazy-inputs/ghc9121/flake.lock create mode 100644 lazy-inputs/ghc9121/flake.nix diff --git a/ci.nix b/ci.nix index 7ff047680..d9378f806 100644 --- a/ci.nix +++ b/ci.nix @@ -73,6 +73,7 @@ ghc98llvm = false; ghc910 = true; ghc910llvm = true; + ghc9121 = true; ghc912X = true; ghc913 = true; }))); diff --git a/lazy-inputs/default.nix b/lazy-inputs/default.nix index bdbc23aea..a1b1f446b 100644 --- a/lazy-inputs/default.nix +++ b/lazy-inputs/default.nix @@ -34,6 +34,7 @@ in { inherit ((callFlake { pkgs = final; src = ./ghc983; }).defaultNix) ghc983; inherit ((callFlake { pkgs = final; src = ./ghc984; }).defaultNix) ghc984; inherit ((callFlake { pkgs = final; src = ./ghc9101; }).defaultNix) ghc9101; + inherit ((callFlake { pkgs = final; src = ./ghc9121; }).defaultNix) ghc9121; inherit ((callFlake { pkgs = final; src = ./ghc912X; }).defaultNix) ghc912X; inherit ((callFlake { pkgs = final; src = ./ghc913; }).defaultNix) ghc913; } // prev.haskell-nix.sources; diff --git a/lazy-inputs/ghc9121/flake.lock b/lazy-inputs/ghc9121/flake.lock new file mode 100644 index 000000000..2b1d28bfc --- /dev/null +++ b/lazy-inputs/ghc9121/flake.lock @@ -0,0 +1,30 @@ +{ + "nodes": { + "ghc9121": { + "flake": false, + "locked": { + "lastModified": 1734278290, + "narHash": "sha256-oSiGEkiQlkmCr7qsFUJ9qpwsU4AumOIpFn6zN4ByMNg=", + "ref": "ghc-9.12.1-iog", + "rev": "daf659b6e3c8f2a84100fbee797cd9d457c00df5", + "revCount": 67524, + "submodules": true, + "type": "git", + "url": "https://github.com/stable-haskell/ghc" + }, + "original": { + "ref": "ghc-9.12.1-iog", + "submodules": true, + "type": "git", + "url": "https://github.com/stable-haskell/ghc" + } + }, + "root": { + "inputs": { + "ghc9121": "ghc9121" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/lazy-inputs/ghc9121/flake.nix b/lazy-inputs/ghc9121/flake.nix new file mode 100644 index 000000000..8973132b0 --- /dev/null +++ b/lazy-inputs/ghc9121/flake.nix @@ -0,0 +1,12 @@ +{ + description = "Lazy Input for Haskell.nix"; + + inputs = { + ghc9121 = { + flake = false; + url = "git+https://github.com/stable-haskell/ghc?ref=ghc-9.12.1-iog&submodules=1"; + }; + }; + + outputs = inputs: inputs; +} diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 1f3827ccd..18416d95d 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -9,6 +9,7 @@ let "9.6" = "9.6.6"; "9.8" = "9.8.4"; "9.10" = "9.10.1"; + "9.12" = "9.12.1"; }; gitInputs = { ghc912X = "9.12.0"; @@ -911,6 +912,38 @@ in { ghc-patches = ghc-patches "9.10.1"; }); + ghc9121 = traceWarnOld "9.12" (final.callPackage ../compiler/ghc { + extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc9121; }; + + bootPkgs = bootPkgsGhc94 // { + ghc = if final.stdenv.buildPlatform != final.stdenv.targetPlatform + then final.buildPackages.buildPackages.haskell-nix.compiler.ghc9121 + else final.buildPackages.buildPackages.haskell.compiler.ghc9121 + or final.buildPackages.buildPackages.haskell.compiler.ghc9101 + or final.buildPackages.buildPackages.haskell.compiler.ghc984 + or final.buildPackages.buildPackages.haskell.compiler.ghc983 + or final.buildPackages.buildPackages.haskell.compiler.ghc982 + or final.buildPackages.buildPackages.haskell.compiler.ghc981 + or final.buildPackages.buildPackages.haskell.compiler.ghc966 + or final.buildPackages.buildPackages.haskell.compiler.ghc965 + or final.buildPackages.buildPackages.haskell.compiler.ghc964 + or final.buildPackages.buildPackages.haskell.compiler.ghc963 + or final.buildPackages.buildPackages.haskell.compiler.ghc962 + or final.buildPackages.buildPackages.haskell.compiler.ghc945 + or final.buildPackages.buildPackages.haskell.compiler.ghc944 + or final.buildPackages.buildPackages.haskell.compiler.ghc943; + }; + inherit sphinx; + + buildLlvmPackages = final.buildPackages.llvmPackages_15; + llvmPackages = final.llvmPackages_15; + + src-spec.file = final.haskell-nix.sources.ghc9121; + src-spec.version = "9.12.1"; + src-spec.needsBooting = true; + + ghc-patches = ghc-patches "9.12.1"; + }); } // (__listToAttrs (final.lib.mapAttrsToList (source-name: ver: let src = final.haskell-nix.sources.${source-name}; From 1adb60b009c01c4f7a6e02ffaa1e357186b939f2 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 3 Jan 2025 15:05:21 +1300 Subject: [PATCH 02/27] Bump head.hackage and stop using it for ghc 9.12 --- test/cabal.project.local | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 7d32b6d98..203a65737 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -28,7 +28,7 @@ repository head.hackage.ghc.haskell.org f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-EQKpiiwoIXiM7r+bGYvQzB4vWANqO6PJaSUlt1NUIeI= + --sha256: sha256-RQS0PUBA6nAD1T0OSVFhcF7ldh+6L+cW+k96Hgo3z5s= repository ghcjs-overlay url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ffb32dce467b9a4d27be759fdd2740a6edd09d0b @@ -41,14 +41,14 @@ if os(ghcjs) extra-packages: ghci constraints: ghci installed -if !impl(ghc>=9.11) && !os(ghcjs) +if !impl(ghc>=9.13) && !os(ghcjs) active-repositories: hackage.haskell.org -if impl(ghc>=9.11) && !os(ghcjs) +if impl(ghc>=9.13) && !os(ghcjs) active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org -if !impl(ghc>=9.11) && os(ghcjs) +if !impl(ghc>=9.13) && os(ghcjs) active-repositories: hackage.haskell.org, ghcjs-overlay:override -if impl(ghc>=9.11) && os(ghcjs) +if impl(ghc>=9.13) && os(ghcjs) active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org, ghcjs-overlay:override From bcb1d8930107a693fce11e17e34e749e43882800 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 3 Jan 2025 21:10:33 +1300 Subject: [PATCH 03/27] Skip plugin test for ghc 9.12.1 --- test/plugin/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/plugin/default.nix b/test/plugin/default.nix index c2fdf1698..ed515040b 100644 --- a/test/plugin/default.nix +++ b/test/plugin/default.nix @@ -20,7 +20,7 @@ in recurseIntoAttrs { # Not sure why this breaks for ghc 8.10.7 meta.disabled = compiler-nix-name == "ghc8107" - || builtins.elem compiler-nix-name [ "ghc912020241128" "ghc91320241204" ] + || builtins.elem compiler-nix-name [ "ghc9121" "ghc912020241128" "ghc91320241204" ] || stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isGhcjs || stdenv.hostPlatform.isWindows From b127690cea5fb44fd716dd799074af662f6b3ae8 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 3 Jan 2025 21:53:23 +1300 Subject: [PATCH 04/27] Update ghc git pins --- lazy-inputs/ghc912X/flake.lock | 8 ++++---- lazy-inputs/ghc913/flake.lock | 8 ++++---- test/gi-gtk/default.nix | 2 +- test/plugin/default.nix | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lazy-inputs/ghc912X/flake.lock b/lazy-inputs/ghc912X/flake.lock index dbf610844..b93ee1ac2 100644 --- a/lazy-inputs/ghc912X/flake.lock +++ b/lazy-inputs/ghc912X/flake.lock @@ -3,11 +3,11 @@ "ghc912X": { "flake": false, "locked": { - "lastModified": 1732798405, - "narHash": "sha256-gYYJMwnnPFHHbSc2SkJldBRl5ECZg3/muFAd21xJqfM=", + "lastModified": 1734278290, + "narHash": "sha256-aKgEM8StW/SmyrciVkGtclw/8eKNOmTjp1hSfxG1qLQ=", "ref": "ghc-9.12", - "rev": "5d938345841e3dff6a1dfa129202ba939a4564c9", - "revCount": 67485, + "rev": "daf659b6e3c8f2a84100fbee797cd9d457c00df5", + "revCount": 67524, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" diff --git a/lazy-inputs/ghc913/flake.lock b/lazy-inputs/ghc913/flake.lock index 010b5c746..d38791baa 100644 --- a/lazy-inputs/ghc913/flake.lock +++ b/lazy-inputs/ghc913/flake.lock @@ -3,11 +3,11 @@ "ghc913": { "flake": false, "locked": { - "lastModified": 1733355534, - "narHash": "sha256-kCiFiMIsOQWfXP73qWjhfvGv8OdFBg7nz6InQc/xhhQ=", + "lastModified": 1735577639, + "narHash": "sha256-1Rbx6NrCza6VGzFfi+9kL7zaSRqqOsZYfcter8Tce6Q=", "ref": "refs/heads/master", - "rev": "cad6fede4252aeff3a0a93e81c2188a825ab39c6", - "revCount": 67629, + "rev": "278a53ee698d961d97afb60be9db2d8bf60b4074", + "revCount": 67713, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" diff --git a/test/gi-gtk/default.nix b/test/gi-gtk/default.nix index c8ef2232a..2a01d3d9b 100644 --- a/test/gi-gtk/default.nix +++ b/test/gi-gtk/default.nix @@ -31,7 +31,7 @@ in recurseIntoAttrs rec { # Cross compilation to aarch64 is also broken || stdenv.hostPlatform.isAarch64 && !stdenv.buildPlatform.isAarch64 # Building profiled version of Cabal for haskell-gi is currently broken for GHC head - || compiler-nix-name == "ghc91320241204"; + || compiler-nix-name == "ghc91320241230"; ifdInputs = { inherit (project) plan-nix; diff --git a/test/plugin/default.nix b/test/plugin/default.nix index ed515040b..3ec41d357 100644 --- a/test/plugin/default.nix +++ b/test/plugin/default.nix @@ -20,7 +20,7 @@ in recurseIntoAttrs { # Not sure why this breaks for ghc 8.10.7 meta.disabled = compiler-nix-name == "ghc8107" - || builtins.elem compiler-nix-name [ "ghc9121" "ghc912020241128" "ghc91320241204" ] + || builtins.elem compiler-nix-name [ "ghc9121" "ghc912020241215" "ghc91320241230" ] || stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isGhcjs || stdenv.hostPlatform.isWindows From f44584907afda853f0ed65ad3f658d9889142db0 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 3 Jan 2025 21:58:34 +1300 Subject: [PATCH 05/27] Update cabal.project.local --- test/cabal.project.local | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 203a65737..dab75fb46 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -5,13 +5,11 @@ if impl(ghc>=9.10.1) -- otherwise we risk running into broken build-plans down the line. allow-newer: *:base, *:template-haskell, *:bytestring, *:text, *:ghc-prim, *:deepseq, *:Cabal -if impl(ghc > 9.11) +if impl(ghc > 9.13) allow-newer: *:containers, *:time constraints: base-compat >=0.14.0, aeson >=2.2.1.0 -- From https://ghc.gitlab.haskell.org/head.hackage/cabal.constraints constraints: extra ==1.7.14 - -if impl(ghc >9.13) constraints: base-orphans <0.9.3 || >0.9.3 -- This prevents hsc2hs from causing old versions of packages from being added to plan.json From bb6a7c2691a8ce3eb798b396be8299cf91a41b50 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 4 Jan 2025 13:37:01 +1300 Subject: [PATCH 06/27] ifdLevel 0 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 4d7a252e9..d9624d0d4 100644 --- a/flake.nix +++ b/flake.nix @@ -83,7 +83,7 @@ let callFlake = import flake-compat; - ifdLevel = 3; + ifdLevel = 0; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From d8ce75bab7c897c65e8f9ca7685053a5e4a72318 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 4 Jan 2025 13:38:34 +1300 Subject: [PATCH 07/27] Try building ghc HEAD with ghc 9.12 --- overlays/bootstrap.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 18416d95d..897c8503e 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -957,8 +957,10 @@ in { bootPkgs = bootPkgsGhc94 // { ghc = if final.stdenv.buildPlatform != final.stdenv.targetPlatform - then final.buildPackages.buildPackages.haskell-nix.compiler.ghc9101 # TODO use ${compiler-nix-name} - else final.buildPackages.buildPackages.haskell.compiler.ghc984 + then final.buildPackages.buildPackages.haskell-nix.compiler.ghc9121 + else final.buildPackages.buildPackages.haskell.compiler.ghc9121 + or final.buildPackages.buildPackages.haskell.compiler.ghc9101 + or final.buildPackages.buildPackages.haskell.compiler.ghc984 or final.buildPackages.buildPackages.haskell.compiler.ghc983 or final.buildPackages.buildPackages.haskell.compiler.ghc982 or final.buildPackages.buildPackages.haskell.compiler.ghc981 From 0e26f988b70c27def712ee670e9413569044c244 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 4 Jan 2025 16:33:05 +1300 Subject: [PATCH 08/27] Update sha256 for git pins --- lazy-inputs/ghc912X/flake.lock | 2 +- lazy-inputs/ghc913/flake.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lazy-inputs/ghc912X/flake.lock b/lazy-inputs/ghc912X/flake.lock index b93ee1ac2..9b29a431e 100644 --- a/lazy-inputs/ghc912X/flake.lock +++ b/lazy-inputs/ghc912X/flake.lock @@ -4,7 +4,7 @@ "flake": false, "locked": { "lastModified": 1734278290, - "narHash": "sha256-aKgEM8StW/SmyrciVkGtclw/8eKNOmTjp1hSfxG1qLQ=", + "narHash": "sha256-oSiGEkiQlkmCr7qsFUJ9qpwsU4AumOIpFn6zN4ByMNg=", "ref": "ghc-9.12", "rev": "daf659b6e3c8f2a84100fbee797cd9d457c00df5", "revCount": 67524, diff --git a/lazy-inputs/ghc913/flake.lock b/lazy-inputs/ghc913/flake.lock index d38791baa..15c5acd8a 100644 --- a/lazy-inputs/ghc913/flake.lock +++ b/lazy-inputs/ghc913/flake.lock @@ -4,7 +4,7 @@ "flake": false, "locked": { "lastModified": 1735577639, - "narHash": "sha256-1Rbx6NrCza6VGzFfi+9kL7zaSRqqOsZYfcter8Tce6Q=", + "narHash": "sha256-sGNckeL3B6Iw+3wawRjgFEXo/dLiyKAtnbFxY9tX6Qg=", "ref": "refs/heads/master", "rev": "278a53ee698d961d97afb60be9db2d8bf60b4074", "revCount": 67713, From a267f87dfad80f59f83b6ff1910db65ea7aa572b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 4 Jan 2025 16:33:38 +1300 Subject: [PATCH 09/27] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index d9624d0d4..4d7a252e9 100644 --- a/flake.nix +++ b/flake.nix @@ -83,7 +83,7 @@ let callFlake = import flake-compat; - ifdLevel = 0; + ifdLevel = 3; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From 7190d0437f4a763ee4ccda5cae9f28e94ad10c97 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 4 Jan 2025 16:51:57 +1300 Subject: [PATCH 10/27] ifdLevel 0 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 4d7a252e9..d9624d0d4 100644 --- a/flake.nix +++ b/flake.nix @@ -83,7 +83,7 @@ let callFlake = import flake-compat; - ifdLevel = 3; + ifdLevel = 0; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From f50509406ce436f1c78fbf21e978c5d022e485a5 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 4 Jan 2025 17:47:26 +1300 Subject: [PATCH 11/27] ifdLevel 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index d9624d0d4..c9235935a 100644 --- a/flake.nix +++ b/flake.nix @@ -83,7 +83,7 @@ let callFlake = import flake-compat; - ifdLevel = 0; + ifdLevel = 1; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From 933d99999b5c164611bbbb9a356dda5849e68ae7 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 4 Jan 2025 17:54:03 +1300 Subject: [PATCH 12/27] Fix ghc912X --- overlays/bootstrap.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 897c8503e..73628c024 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -12,7 +12,7 @@ let "9.12" = "9.12.1"; }; gitInputs = { - ghc912X = "9.12.0"; + ghc912X = "9.12.1"; ghc913 = "9.13"; }; versionToNixName = v: "ghc${builtins.replaceStrings ["."] [""] v}"; From 26f6823f80947ff2b34a81b44e736cc5754f78c4 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Sat, 4 Jan 2025 18:08:09 +1300 Subject: [PATCH 13/27] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c9235935a..eafbf034c 100644 --- a/flake.nix +++ b/flake.nix @@ -83,7 +83,7 @@ let callFlake = import flake-compat; - ifdLevel = 1; + ifdLevel = 2; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From 78f5c6032d883ad4517b7e4fcff5072462dc844a Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 6 Jan 2025 11:34:13 +1300 Subject: [PATCH 14/27] Fix for latest GHC head where ghc-bignum has no exported-modules and renames som of the reexported ones. --- lib/call-cabal-project-to-nix.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/call-cabal-project-to-nix.nix b/lib/call-cabal-project-to-nix.nix index d90f5716b..576bf6e84 100644 --- a/lib/call-cabal-project-to-nix.nix +++ b/lib/call-cabal-project-to-nix.nix @@ -511,8 +511,8 @@ let json_cabal_file=$(mktemp) cabal2json $fixed_cabal_file > $json_cabal_file - exposed_modules="$(jq -r '.library."exposed-modules"[]|select(type=="array")[]' $json_cabal_file)" - reexported_modules="$(jq -r '.library."reexported-modules"//[]|.[]|select(type=="array")[]' $json_cabal_file)" + exposed_modules="$(jq -r '.library."exposed-modules"//[]|.[]|select(type=="array")[]' $json_cabal_file)" + reexported_modules="$(jq -r '.library."reexported-modules"//[]|.[]|select(type=="array")[]' $json_cabal_file | sed 's/.* as //g')" # FIXME This is a bandaid. Rather than doing this, conditionals should be interpreted. ${pkgs.lib.optionalString pkgs.stdenv.targetPlatform.isGhcjs '' From 22b3d02552a7acbbbc4b43cb3b428b25c64167da Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 6 Jan 2025 11:39:48 +1300 Subject: [PATCH 15/27] Fix for latest GHC head where ghc-bignum has no exported-modules and renames som of the reexported ones. --- lib/call-cabal-project-to-nix.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/call-cabal-project-to-nix.nix b/lib/call-cabal-project-to-nix.nix index 576bf6e84..c8ba1c746 100644 --- a/lib/call-cabal-project-to-nix.nix +++ b/lib/call-cabal-project-to-nix.nix @@ -516,13 +516,13 @@ let # FIXME This is a bandaid. Rather than doing this, conditionals should be interpreted. ${pkgs.lib.optionalString pkgs.stdenv.targetPlatform.isGhcjs '' - exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.arch == "javascript")|.then[]' $json_cabal_file)" + exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.arch == "javascript")|.then[]' $json_cabal_file)" ''} ${pkgs.lib.optionalString pkgs.stdenv.targetPlatform.isWindows '' - exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.os == "windows")|.then[]' $json_cabal_file)" + exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.os == "windows")|.then[]' $json_cabal_file)" ''} ${pkgs.lib.optionalString (!pkgs.stdenv.targetPlatform.isWindows) '' - exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.not.os == "windows")|.then[]' $json_cabal_file)" + exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.not.os == "windows")|.then[]' $json_cabal_file)" ''} EXPOSED_MODULES_${varname name}="$(tr '\n' ' ' <<< "$exposed_modules $reexported_modules")" From ebe61d5fd51d853975d4f6c5a42cdbfca5d08781 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 6 Jan 2025 14:58:25 +1300 Subject: [PATCH 16/27] Fix test plans --- test/cabal.project.local | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index dab75fb46..47e1f66a6 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -1,12 +1,12 @@ -if impl(ghc>=9.10.1) +if impl(ghc>=9.12.1) -- allow newer packages, that are bound to be newer due to -- being shipped with a newer compiler. If you extend this -- be very careful to only extend it for absolutely necessary packages -- otherwise we risk running into broken build-plans down the line. - allow-newer: *:base, *:template-haskell, *:bytestring, *:text, *:ghc-prim, *:deepseq, *:Cabal + allow-newer: *:base, *:template-haskell, *:ghc-prim if impl(ghc > 9.13) - allow-newer: *:containers, *:time + allow-newer: *:containers, *:time, *:ghc-bignum constraints: base-compat >=0.14.0, aeson >=2.2.1.0 -- From https://ghc.gitlab.haskell.org/head.hackage/cabal.constraints constraints: extra ==1.7.14 From 2f4d22ad8df206e5e0e003e4993d86bd463f8717 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 6 Jan 2025 14:58:38 +1300 Subject: [PATCH 17/27] ifdLevel 3 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index eafbf034c..4d7a252e9 100644 --- a/flake.nix +++ b/flake.nix @@ -83,7 +83,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 3; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From 5dbd6e24fd4cbabd2b6c6cbfd6b6d9ebea92c4e5 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 6 Jan 2025 16:35:30 +1300 Subject: [PATCH 18/27] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 4d7a252e9..eafbf034c 100644 --- a/flake.nix +++ b/flake.nix @@ -83,7 +83,7 @@ let callFlake = import flake-compat; - ifdLevel = 3; + ifdLevel = 2; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From 8ca4091fc5a1ba2afef5580bcb0d8958391fde5c Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 6 Jan 2025 17:22:30 +1300 Subject: [PATCH 19/27] Skip broken test --- test/plugin/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/plugin/default.nix b/test/plugin/default.nix index 3ec41d357..a20d95964 100644 --- a/test/plugin/default.nix +++ b/test/plugin/default.nix @@ -20,7 +20,7 @@ in recurseIntoAttrs { # Not sure why this breaks for ghc 8.10.7 meta.disabled = compiler-nix-name == "ghc8107" - || builtins.elem compiler-nix-name [ "ghc9121" "ghc912020241215" "ghc91320241230" ] + || builtins.elem compiler-nix-name [ "ghc9121" "ghc912120241215" "ghc91320241230" ] || stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isGhcjs || stdenv.hostPlatform.isWindows From bea2d8c7228f81974b440ff6052439087b630a1b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 6 Jan 2025 17:23:44 +1300 Subject: [PATCH 20/27] ifdLevel 3 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index eafbf034c..4d7a252e9 100644 --- a/flake.nix +++ b/flake.nix @@ -83,7 +83,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 3; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From 9a253e41322340689648242172a10ba174189072 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 6 Jan 2025 19:54:18 +1300 Subject: [PATCH 21/27] Fix cabal-latest for ghc HEAD --- build.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.nix b/build.nix index 84644af1a..728468232 100644 --- a/build.nix +++ b/build.nix @@ -28,7 +28,7 @@ in rec { pkgs.recurseIntoAttrs ({ cabal-latest = tool compiler-nix-name "cabal" ({ inherit evalPackages; - } // pkgs.lib.optionalAttrs (ghcFromTo "9.12" "9.13") { + } // pkgs.lib.optionalAttrs (ghcFromTo "9.13" "9.14") { cabalProjectLocal = builtins.readFile ./test/cabal.project.local; }); } // pkgs.lib.optionalAttrs (__compareVersions haskell.compiler.${compiler-nix-name}.version "9.8" < 0) { From cb886fde603457e858620026437774b28f28f42e Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 7 Jan 2025 11:45:05 +1300 Subject: [PATCH 22/27] Fix for gi-gtk test --- test/gi-gtk/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/gi-gtk/default.nix b/test/gi-gtk/default.nix index 2a01d3d9b..e2ea19d13 100644 --- a/test/gi-gtk/default.nix +++ b/test/gi-gtk/default.nix @@ -8,12 +8,8 @@ let inherit compiler-nix-name evalPackages; src = testSrc "gi-gtk"; cabalProjectLocal = builtins.readFile ../cabal.project.local + '' - -- haskell-gi 0.26.12 breaks gi-gtkpixbuf - index-state: 2024-09-30T00:00:00Z -- The overloading feature of haskell-gi makes build times very long constraints: haskell-gi-overloading ==0.0 - if impl(ghc >=9.11) - constraints: filepath source ''; }; From 874a5cfffca734ee4f5751553453ae8b8d4ef8a4 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 7 Jan 2025 12:20:51 +1300 Subject: [PATCH 23/27] Fix for gi-gtk test --- test/cabal.project.local | 3 --- test/gi-gtk/default.nix | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 47e1f66a6..139f84d65 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -15,9 +15,6 @@ if impl(ghc > 9.13) -- This prevents hsc2hs from causing old versions of packages from being added to plan.json allow-newer: hsc2hs:* -if impl(ghc >=9.10.1) - extra-packages: process - repository head.hackage.ghc.haskell.org url: https://ghc.gitlab.haskell.org/head.hackage/ secure: True diff --git a/test/gi-gtk/default.nix b/test/gi-gtk/default.nix index e2ea19d13..7365e1ae7 100644 --- a/test/gi-gtk/default.nix +++ b/test/gi-gtk/default.nix @@ -25,9 +25,7 @@ in recurseIntoAttrs rec { # error: incompatible pointer to integer conversion assigning to 'ffi_arg' (aka 'unsigned long') from 'HsPtr' (aka 'void *') [-Wint-conversion] || builtins.elem compiler-nix-name ["ghc8107" "ghc902" "ghc928" "ghc948"] && stdenv.hostPlatform.isAarch64 # Cross compilation to aarch64 is also broken - || stdenv.hostPlatform.isAarch64 && !stdenv.buildPlatform.isAarch64 - # Building profiled version of Cabal for haskell-gi is currently broken for GHC head - || compiler-nix-name == "ghc91320241230"; + || stdenv.hostPlatform.isAarch64 && !stdenv.buildPlatform.isAarch64; ifdInputs = { inherit (project) plan-nix; From 2c478e5a150378b5d7eaa637bc274607423fed05 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 7 Jan 2025 12:24:47 +1300 Subject: [PATCH 24/27] ifdLevel 2 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 4d7a252e9..eafbf034c 100644 --- a/flake.nix +++ b/flake.nix @@ -83,7 +83,7 @@ let callFlake = import flake-compat; - ifdLevel = 3; + ifdLevel = 2; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From 266d28033a1667cda4b30ee45f181b0ae5d63688 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 7 Jan 2025 12:28:22 +1300 Subject: [PATCH 25/27] ifdLevel 3 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index eafbf034c..4d7a252e9 100644 --- a/flake.nix +++ b/flake.nix @@ -83,7 +83,7 @@ let callFlake = import flake-compat; - ifdLevel = 2; + ifdLevel = 3; runningHydraEvalTest = false; defaultCompiler = "ghc928"; config = import ./config.nix; From 3b5b4125a035a3967227603b59420a89b1d5b659 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 7 Jan 2025 13:23:18 +1300 Subject: [PATCH 26/27] Skip failing tests --- test/th-dlls/default.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/th-dlls/default.nix b/test/th-dlls/default.nix index 9e2ac540a..3597aa330 100644 --- a/test/th-dlls/default.nix +++ b/test/th-dlls/default.nix @@ -22,18 +22,10 @@ in recurseIntoAttrs { meta.disabled = stdenv.hostPlatform.isGhcjs # On aarch64 this test also breaks form musl builds (including cross compiles on x86_64-linux) || (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isMusl) - # On for aarch64 cross compile on GHC 9.8.4 this test is fails sometimes for non profiled builds - # (and always for the profiled builds). - # This may be related to the memory allocation changes made in 9.8.4 that - # replace the pool allocator patches we used in earlier versions. - || (compiler-nix-name == "ghc984" && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64) # Failed to lookup symbol: __aarch64_swp8_acq_rel || (builtins.elem compiler-nix-name ["ghc947" "ghc948"] && haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64) # We have been unable to get windows cross compilation of th-orphans to work for GHC 8.10 using the latest nixpkgs || (compiler-nix-name == "ghc8107" && stdenv.hostPlatform.isWindows) - # We need to update GHC HEAD to get a version of ghc-internal compatible - # with th-lift from head.hackage. - || builtins.elem compiler-nix-name [ "ghc91320241204" ] ; ifdInputs = { @@ -41,9 +33,17 @@ in recurseIntoAttrs { }; build = packages.th-dlls.components.library; - build-profiled = packages.th-dlls.components.library.profiled; just-template-haskell = packages.th-dlls.components.exes.just-template-haskell; build-ei = packages-ei.th-dlls.components.library; - build-profiled-ei = packages-ei.th-dlls.components.library.profiled; just-template-haskell-ei = packages-ei.th-dlls.components.exes.just-template-haskell; +} // optionalAttrs + (!(builtins.elem compiler-nix-name ["ghc984" "ghc9121" "ghc912120241215x"] && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64)) { + # On for aarch64 cross compile on GHC this test is fails sometimes for non profiled builds + # (and always for the profiled builds). + # This may be related to the memory allocation changes made in 9.8.4 that + # replace the pool allocator patches we used in earlier versions. + + # Interestingly GHC 9.10.1 and HEAD are wotking while 9.8.4 and 9.12 seem break. + build-profiled = packages.th-dlls.components.library.profiled; + build-profiled-ei = packages-ei.th-dlls.components.library.profiled; } From 0d79e71ce2459163000fd29b5893363636611764 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 7 Jan 2025 14:32:00 +1300 Subject: [PATCH 27/27] Skip failing tests --- test/th-dlls/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/th-dlls/default.nix b/test/th-dlls/default.nix index 3597aa330..e2d7bc93d 100644 --- a/test/th-dlls/default.nix +++ b/test/th-dlls/default.nix @@ -37,13 +37,14 @@ in recurseIntoAttrs { build-ei = packages-ei.th-dlls.components.library; just-template-haskell-ei = packages-ei.th-dlls.components.exes.just-template-haskell; } // optionalAttrs - (!(builtins.elem compiler-nix-name ["ghc984" "ghc9121" "ghc912120241215x"] && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64)) { + (!(builtins.elem compiler-nix-name ["ghc984" "ghc9121" "ghc912120241215"] && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64)) { # On for aarch64 cross compile on GHC this test is fails sometimes for non profiled builds # (and always for the profiled builds). # This may be related to the memory allocation changes made in 9.8.4 that # replace the pool allocator patches we used in earlier versions. # Interestingly GHC 9.10.1 and HEAD are wotking while 9.8.4 and 9.12 seem break. + # Perhaps there is a fix in GHC HEAD? build-profiled = packages.th-dlls.components.library.profiled; build-profiled-ei = packages-ei.th-dlls.components.library.profiled; }