From patchwork Wed Dec 20 07:10:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saku Laesvuori X-Patchwork-Id: 57921 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A98DD27BBEA; Wed, 20 Dec 2023 07:12:12 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1859027BBE2 for ; Wed, 20 Dec 2023 07:12:11 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rFqkL-00047W-N1; Wed, 20 Dec 2023 02:12:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFqkK-00047N-5B for guix-patches@gnu.org; Wed, 20 Dec 2023 02:12:00 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rFqkJ-00017u-St for guix-patches@gnu.org; Wed, 20 Dec 2023 02:11:59 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rFqkM-0007Hs-80; Wed, 20 Dec 2023 02:12:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67921] [PATCH haskell-team 1/3] gnu: ghc-next: Update to version 9.4.8 Resent-From: Saku Laesvuori Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, guix-patches@gnu.org Resent-Date: Wed, 20 Dec 2023 07:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67921@debbugs.gnu.org Cc: Saku Laesvuori , Lars-Dominik Braun X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Lars-Dominik Braun Received: via spool by submit@debbugs.gnu.org id=B.170305626927935 (code B ref -1); Wed, 20 Dec 2023 07:12:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Dec 2023 07:11:09 +0000 Received: from localhost ([127.0.0.1]:38498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFqjV-0007GT-02 for submit@debbugs.gnu.org; Wed, 20 Dec 2023 02:11:09 -0500 Received: from lists.gnu.org ([2001:470:142::17]:58098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFqjS-0007Fw-Ld for submit@debbugs.gnu.org; Wed, 20 Dec 2023 02:11:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFqjJ-00043i-QW for guix-patches@gnu.org; Wed, 20 Dec 2023 02:10:57 -0500 Received: from vmi571514.contaboserver.net ([75.119.130.101] helo=mail.laesvuori.fi) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFqjH-0000g5-IL for guix-patches@gnu.org; Wed, 20 Dec 2023 02:10:57 -0500 Received: from X-kone.org.aalto.fi (unknown [130.233.144.71]) by mail.laesvuori.fi (Postfix) with ESMTPSA id A4B2E342FF8; Wed, 20 Dec 2023 08:10:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=laesvuori.fi; s=mail; t=1703056258; bh=eOUw8LOiNKRVvNCikUcvDsapxXdUk41tLLorzxNjXbw=; h=From:To:Cc:Subject:Date; b=PDurbtMZLNDZ4cY4bnX56y40pYUEu5PLiaRnVGi4mFmaFlbmmVLtTH6BmuwFhiE04 SEmjFsXP9nm7THecf0x1gdOol7WSDlaoyDRRP+/HqP5mziJlGW5HyI5Du6+3xXW6Rb rUhy6k6P0N0EQM+S7NDx6PG02+BU3WbCSH94yAMM= Date: Wed, 20 Dec 2023 09:10:38 +0200 Message-ID: <5cdfcf3aadfbe42655b941764d5a700b6d4bca88.1703056111.git.saku@laesvuori.fi> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=75.119.130.101; envelope-from=saku@laesvuori.fi; helo=mail.laesvuori.fi X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Saku Laesvuori X-ACL-Warn: , Saku Laesvuori via Guix-patches X-Patchwork-Original-From: Saku Laesvuori via Guix-patches via From: Saku Laesvuori Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/haskell.scm (ghc-9.4): Update to version 9.4.8. [native-inputs]: Add a patch to fix the testsuite. (ghc-happy-bootstrap-for-9.4): Update to version 1.20.1.1. * gnu/packages/patches/ghc-9.4-testsuite-fixes.patch: New patch. Change-Id: I5ef72f83e5feed1defb706bafa934077fda1553c --- gnu/packages/haskell.scm | 11 +- .../patches/ghc-9.4-testsuite-fixes.patch | 119 ++++++++++++++++++ 2 files changed, 125 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/ghc-9.4-testsuite-fixes.patch base-commit: dc2b59ddc1e8f510935777db40e881896f7a0cab diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 62815efbb1..88826fb31f 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -1437,14 +1437,14 @@ (define ghc-happy-bootstrap-for-9.4 (hidden-package (package (name "ghc-happy") - (version "1.20.0") + (version "1.20.1.1") (source (origin (method url-fetch) (uri (hackage-uri "happy" version)) (sha256 (base32 - "1346r2x5ravs5fqma65bzjragqbb2g6v41wz9maknwm2jf7kl79v")))) + "06w8g3lfk2ynrfhqznhp1mnp8a5b64lj6qviixpndzf5lv2psklb")))) (build-system haskell-build-system) (arguments (list #:haskell ghc-bootstrap-for-9.4 @@ -1462,14 +1462,14 @@ (define-public ghc-9.4 (package (inherit base) (name "ghc-next") - (version "9.4.4") + (version "9.4.8") (source (origin (method url-fetch) (uri (string-append "https://www.haskell.org/ghc/dist/" version "/ghc-" version "-src.tar.xz")) (sha256 (base32 - "1qk7rlqf02s3b6m6sqqngmjq1mxnrz88h159lz6k25gddmdg5kp8")))) + "0pmqg9846lanb0hcyxhgr9ipzq33rfldxj7ln0j3qgpyczmhgx0b")))) (arguments (substitute-keyword-arguments (package-arguments base) ((#:phases phases '%standard-phases) @@ -1487,7 +1487,8 @@ (define-public ghc-9.4 version "/ghc-" version "-testsuite.tar.xz")) (sha256 (base32 - "04p2lawxxg3nyv6frzhyjyh3arhqqyh5ka3alxa2pxhcd2hdcja3")))) + "159wsqnqpqb0pxa3zyhvyg07wxr2zz7v52h52wkplw4pn12dsidc")) + (patches (search-patches "ghc-9.4-testsuite-fixes.patch")))) ("ghc-alex" ,ghc-alex-bootstrap-for-9.4) ("ghc-happy" ,ghc-happy-bootstrap-for-9.4) ,@(filter (match-lambda diff --git a/gnu/packages/patches/ghc-9.4-testsuite-fixes.patch b/gnu/packages/patches/ghc-9.4-testsuite-fixes.patch new file mode 100644 index 0000000000..f394632add --- /dev/null +++ b/gnu/packages/patches/ghc-9.4-testsuite-fixes.patch @@ -0,0 +1,119 @@ +From 3acd8aa948a27465cffc8e2ab56229485e2a5b98 Mon Sep 17 00:00:00 2001 +From: Saku Laesvuori +Date: Tue, 5 Dec 2023 22:49:45 +0200 +Subject: [PATCH] Fix tests + +* replaces egrep with grep -E +* removes unnecessary escaping in some grep regular expressions +* adds a missing include header to a makefile +--- + testsuite/tests/cabal/cabal01/Makefile | 2 +- + testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile | 4 ++++ + testsuite/tests/haddock/perf/Makefile | 8 ++++---- + testsuite/tests/hsc2hs/Makefile | 4 ++-- + testsuite/tests/numeric/should_run/T7014.primops | 4 ++-- + testsuite/tests/simplCore/should_compile/Makefile | 4 ++-- + 6 files changed, 15 insertions(+), 11 deletions(-) + +diff --git a/testsuite/tests/cabal/cabal01/Makefile b/testsuite/tests/cabal/cabal01/Makefile +index 004e4c75..6ec499c9 100644 +--- a/testsuite/tests/cabal/cabal01/Makefile ++++ b/testsuite/tests/cabal/cabal01/Makefile +@@ -5,7 +5,7 @@ include $(TOP)/mk/test.mk + # Find all the env variables starting with CI_ to unset them. + # Otherwise, we might run into environment length limitations on Windows. + # (See `xargs --show-limits`.) +-VARS_TO_UNSET := $(shell env | grep ^CI_ | egrep -o '^[^=]+') ++VARS_TO_UNSET := $(shell env | grep ^CI_ | grep -E -o '^[^=]+') + unexport $(VARS_TO_UNSET) + + clean: +diff --git a/testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile b/testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile +index fd64d23f..cb669db3 100644 +--- a/testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile ++++ b/testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile +@@ -1,3 +1,7 @@ ++TOP=../../../.. ++include $(TOP)/mk/boilerplate.mk ++include $(TOP)/mk/test.mk ++ + .PHONY: GHCiPrimCall + GHCiPrimCall: + '$(TEST_HC)' $(TEST_HC_OPTS) -fPIC -v0 -c GHCiPrimCall_cmm.cmm +diff --git a/testsuite/tests/haddock/perf/Makefile b/testsuite/tests/haddock/perf/Makefile +index b67b52f2..ff2f7ebb 100644 +--- a/testsuite/tests/haddock/perf/Makefile ++++ b/testsuite/tests/haddock/perf/Makefile +@@ -4,12 +4,12 @@ include $(TOP)/mk/test.mk + + # We accept a 5% increase in parser allocations due to -haddock + haddock_parser_perf : +- WithHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -haddock -O0 Fold.hs 2>/dev/null | grep Parser | egrep -o 'alloc=[0-9]+' | cut -c7- ) ; \ +- WithoutHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -O0 Fold.hs 2>/dev/null | grep Parser | egrep -o 'alloc=[0-9]+' | cut -c7- ) ; \ ++ WithHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -haddock -O0 Fold.hs 2>/dev/null | grep Parser | grep -E -o 'alloc=[0-9]+' | cut -c7- ) ; \ ++ WithoutHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -O0 Fold.hs 2>/dev/null | grep Parser | grep -E -o 'alloc=[0-9]+' | cut -c7- ) ; \ + awk "BEGIN { ratio = ($$WithHaddock / $$WithoutHaddock); if (ratio > 1.05) {print \"-haddock allocation ratio too high:\", ratio; exit 1} else {exit 0} }" + + # Similarly for the renamer + haddock_renamer_perf : +- WithoutHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -O0 Fold.hs 2>/dev/null | grep Renamer | egrep -o 'alloc=[0-9]+' | cut -c7- ) ; \ +- WithHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -haddock -O0 Fold.hs 2>/dev/null | grep Renamer | egrep -o 'alloc=[0-9]+' | cut -c7- ) ; \ ++ WithoutHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -O0 Fold.hs 2>/dev/null | grep Renamer | grep -E -o 'alloc=[0-9]+' | cut -c7- ) ; \ ++ WithHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -haddock -O0 Fold.hs 2>/dev/null | grep Renamer | grep -E -o 'alloc=[0-9]+' | cut -c7- ) ; \ + awk "BEGIN { ratio = ($$WithHaddock / $$WithoutHaddock); if (ratio > 1.05) {print \"-haddock allocation ratio too high:\", ratio; exit 1} else {exit 0} }" +diff --git a/testsuite/tests/hsc2hs/Makefile b/testsuite/tests/hsc2hs/Makefile +index d0b2d249..95b011c8 100644 +--- a/testsuite/tests/hsc2hs/Makefile ++++ b/testsuite/tests/hsc2hs/Makefile +@@ -52,9 +52,9 @@ T11004: + T12504: + '$(HSC2HS)' $(HSC2HS_OPTS) T12504/path/to/$@.hsc + ifeq "$(WINDOWS)" "YES" +- grep '{-# LINE 1 \"T12504\\\\path\\\\to\\\\$@\.hsc\" #-}' T12504/path/to/$@.hs ++ grep '{-# LINE 1 "T12504\\\\path\\\\to\\\\$@\.hsc" #-}' T12504/path/to/$@.hs + else +- grep '{-# LINE 1 \"T12504/path/to/$@\.hsc\" #-}' T12504/path/to/$@.hs ++ grep '{-# LINE 1 "T12504/path/to/$@\.hsc" #-}' T12504/path/to/$@.hs + endif + + .PHONY: T15758 +diff --git a/testsuite/tests/numeric/should_run/T7014.primops b/testsuite/tests/numeric/should_run/T7014.primops +index 3243666d..c807fb45 100644 +--- a/testsuite/tests/numeric/should_run/T7014.primops ++++ b/testsuite/tests/numeric/should_run/T7014.primops +@@ -1,8 +1,8 @@ + and# + or# + uncheckedShift.*# +-\+# +-\-# +++# ++-# + \*# + quotInt# + remInt# +diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile +index b5041800..c56e04f6 100644 +--- a/testsuite/tests/simplCore/should_compile/Makefile ++++ b/testsuite/tests/simplCore/should_compile/Makefile +@@ -66,7 +66,7 @@ T13367: + + T8832: + $(RM) -f T8832.o T8832.hi +- '$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl -dsuppress-ticks T8832.hs | egrep '^[a-zA-Z0-9]+ =' ++ '$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl -dsuppress-ticks T8832.hs | grep -E '^[a-zA-Z0-9]+ =' + + T12603: + $(RM) -f T12603.o T12603.hi +@@ -259,7 +259,7 @@ str-rules: + # g should have been collapsed into one defininition by CSE. + .PHONY: T13340 + T13340: +- '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T13340.hs -ddump-simpl -dsuppress-all | grep -c '\+#' ++ '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T13340.hs -ddump-simpl -dsuppress-all | grep -c '+#' + + + # We expect to see all dictionaries specialized away. +-- +2.41.0 +