Skip to content

Commit

Permalink
Update GHC 9.12 and HEAD git pins (#2289)
Browse files Browse the repository at this point in the history
* Update GHC 9.12 and HEAD git pins

* Manually update hashes

* Add .0 to GHC 9.12

* Update head.hackage

* Skip broken tests

* Fixes for mingwW64

* Skip broken tests

* Skip broken tests
  • Loading branch information
hamishmack authored Dec 9, 2024
1 parent 62b367b commit 6742e78
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 22 deletions.
16 changes: 8 additions & 8 deletions ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,30 +82,30 @@
let lib = nixpkgs.lib;
in lib.optionalAttrs (nixpkgsName == "unstable"
&& (__match ".*llvm" compiler-nix-name == null)
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc948"])
|| (system == "aarch64-linux" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc948"])
|| (system == "x86_64-darwin" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc948" "ghc966" "ghc982" "ghc983" "ghc984"])
|| (system == "aarch64-darwin" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc948" "ghc966" "ghc982" "ghc983" "ghc984"])
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"])
|| (system == "aarch64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"])
|| (system == "x86_64-darwin" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc966" "ghc982" "ghc983" "ghc984"])
|| (system == "aarch64-darwin" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc966" "ghc982" "ghc983" "ghc984"])
)) {
inherit (lib.systems.examples) ghcjs;
} // lib.optionalAttrs (
(__match ".*llvm" compiler-nix-name == null)
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc91220241014" "ghc91320241101"]) # Including GHC HEAD here because the patches for rts/RtsSymbols.c no longer apply and mingwW64 GHC build fails without them
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928"]) # Including GHC HEAD here because the patches for rts/RtsSymbols.c no longer apply and mingwW64 GHC build fails without them
|| (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity
inherit (lib.systems.examples) mingwW64;
} // lib.optionalAttrs (nixpkgsName == "unstable"
&& (__match ".*llvm" compiler-nix-name == null)
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc884" "ghc8107" "ghc902" "ghc928" "ghc948"])
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902" "ghc928" "ghc948"])
|| (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity
inherit (lib.systems.examples) ucrt64;
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc884" "ghc902" "ghc928" "ghc948"]) {
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) {
# Musl cross only works on linux
# aarch64 cross only works on linux
inherit (lib.systems.examples) musl64 aarch64-multiplatform;
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && builtins.elem compiler-nix-name ["ghc927" "ghc928"]) {
# TODO fix this for the compilers we build with hadrian (ghc >=9.4)
inherit (lib.systems.examples) aarch64-multiplatform-musl;
} // lib.optionalAttrs (system == "aarch64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc884" "ghc8107" "ghc902"]) {
} // lib.optionalAttrs (system == "aarch64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902"]) {
inherit (lib.systems.examples) aarch64-multiplatform-musl;
};
isDisabled = d: d.meta.disabled or false;
Expand Down
8 changes: 4 additions & 4 deletions lazy-inputs/ghc912X/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions lazy-inputs/ghc913/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion overlays/bootstrap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let
"9.10" = "9.10.1";
};
gitInputs = {
ghc912X = "9.12";
ghc912X = "9.12.0";
ghc913 = "9.13";
};
versionToNixName = v: "ghc${builtins.replaceStrings ["."] [""] v}";
Expand Down Expand Up @@ -157,6 +157,7 @@ in {
++ onWindows (fromUntil "9.8.1" "9.8.2" ./patches/ghc/win-linker-no-null-deref-9.6.patch)
++ onWindows (until "9.0" ./patches/ghc/ghc-8.10-windres-invocation.patch)
++ onWindows (fromUntil "9.0" "9.4" ./patches/ghc/ghc-9.0-windres-invocation.patch)
++ onWindows (from "9.12" ./patches/ghc/ghc-9.12-windows-rts-symbols.patch)
++ fromUntil "9.4.5" "9.4.9" ./patches/ghc/ghc-9.4.5-include-order-fix.patch
++ fromUntil "9.6.2" "9.8" ./patches/ghc/ghc-9.4.5-include-order-fix.patch
++ fromUntil "9.6.1" "9.9.20231203" ./patches/ghc/MR10116.patch
Expand Down
29 changes: 29 additions & 0 deletions overlays/patches/ghc/ghc-9.12-windows-rts-symbols.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c
index a447f126bd..93af0f511f 100644
--- a/rts/RtsSymbols.c
+++ b/rts/RtsSymbols.c
@@ -165,15 +165,21 @@ extern char **environ;
SymI_HasProto(rts_ConsoleHandlerDone) \
SymI_NeedsProto(__mingw_module_is_dll) \
RTS_WIN64_ONLY(SymI_NeedsProto(___chkstk_ms)) \
- SymI_HasProto(__stdio_common_vswprintf_s) \
- SymI_HasProto(__stdio_common_vswprintf) \
SymI_HasProto(_errno) \
/* see Note [Symbols for MinGW's printf] */ \
SymI_HasProto(_lock_file) \
SymI_HasProto(_unlock_file) \
/* See Note [_iob_func symbol] */ \
SymI_HasProto_redirect( \
- __imp___acrt_iob_func, __rts_iob_func, STRENGTH_WEAK, SYM_TYPE_INDIRECT_DATA)
+ __imp___acrt_iob_func, __rts_iob_func, STRENGTH_WEAK, SYM_TYPE_INDIRECT_DATA) \
+ SymI_HasProto(__mingw_vsnwprintf) \
+ SymI_HasProto(__mingw_vfprintf) \
+ SymI_HasProto(closure_sizeW_) \
+ SymI_NeedsProto(_tzset) \
+ /* ^^ This one needed for time, tzset deprecated */\
+ SymI_NeedsProto(tzset) \
+ SymI_HasProto(strtoll)
+ /* ^^ These two are needed for unix-time */
#else
#define RTS_MINGW_ONLY_SYMBOLS /**/
#endif
2 changes: 1 addition & 1 deletion test/cabal.project.local
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repository head.hackage.ghc.haskell.org
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
--sha256: sha256-0eRaAKpZ7NzlneI7AnTOymTGrRectxnoaLosjY4aGC4=
--sha256: sha256-EQKpiiwoIXiM7r+bGYvQzB4vWANqO6PJaSUlt1NUIeI=

repository ghcjs-overlay
url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ffb32dce467b9a4d27be759fdd2740a6edd09d0b
Expand Down
2 changes: 1 addition & 1 deletion test/gi-gtk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "ghc91320241101";
|| compiler-nix-name == "ghc91320241204";

ifdInputs = {
inherit (project) plan-nix;
Expand Down
3 changes: 2 additions & 1 deletion test/js-template-haskell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ in recurseIntoAttrs {
inherit (project) plan-nix;
};

meta.disabled = stdenv.buildPlatform != stdenv.hostPlatform && stdenv.hostPlatform.isAarch64;
meta.disabled = stdenv.buildPlatform != stdenv.hostPlatform && stdenv.hostPlatform.isAarch64
|| builtins.elem compiler-nix-name ["ghc91320241204"];

build = packages.js-template-haskell.components.library;
check = packages.js-template-haskell.checks.test;
Expand Down
2 changes: 1 addition & 1 deletion test/plugin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 [ "ghc91220241014" "ghc91320241101" ]
|| builtins.elem compiler-nix-name [ "ghc912020241128" "ghc91320241204" ]
|| stdenv.hostPlatform.isMusl
|| stdenv.hostPlatform.isGhcjs
|| stdenv.hostPlatform.isWindows
Expand Down
2 changes: 1 addition & 1 deletion test/th-dlls/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ in recurseIntoAttrs {
|| (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 [ "ghc91220241014" "ghc91320241101" ]
|| builtins.elem compiler-nix-name [ "ghc91320241204" ]
;

ifdInputs = {
Expand Down

0 comments on commit 6742e78

Please sign in to comment.