From unknown Fri Sep 12 00:24:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#32608] [PATCH] gnu: haskell-mode: Fix test failure. Resent-From: Alex Vong Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 02 Sep 2018 00:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32608 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 32608@debbugs.gnu.org Cc: alexvong1995@gmail.com X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.153584855217992 (code B ref -1); Sun, 02 Sep 2018 00:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Sep 2018 00:35:52 +0000 Received: from localhost ([127.0.0.1]:42242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwGMj-0004g2-ES for submit@debbugs.gnu.org; Sat, 01 Sep 2018 20:35:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwGMe-0004fi-H5 for submit@debbugs.gnu.org; Sat, 01 Sep 2018 20:35:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwGMY-0004YP-3N for submit@debbugs.gnu.org; Sat, 01 Sep 2018 20:35:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50425) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fwGMX-0004Ws-RN for submit@debbugs.gnu.org; Sat, 01 Sep 2018 20:35:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwGMV-0003HR-TK for guix-patches@gnu.org; Sat, 01 Sep 2018 20:35:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwGMR-0004OI-QM for guix-patches@gnu.org; Sat, 01 Sep 2018 20:35:31 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:37734) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fwGMR-0004NQ-FX for guix-patches@gnu.org; Sat, 01 Sep 2018 20:35:27 -0400 Received: by mail-pf1-x42f.google.com with SMTP id h69-v6so7125028pfd.4 for ; Sat, 01 Sep 2018 17:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=D3lFQz3wGc9gje8yZybA1phbAamoxnGnsNgPwPmWke4=; b=QuRZFSscuOHiP9H8tIhZGfsBE1Rk7XCsfxMYKVoGQ4sOADx5z6Kfe4jqr9rZR4bXd/ k+t8sVndmbHUk9LKdRAuf6dK55BgWHz1AN3hiSjGmLj5/+FNNhfzuK83JEiSa9YilhRw RYcUech6JovLz7o2S18fQ77wMkGRNUgyFGtLuSkF+u5iM6yXomtPNxv/30Gmp7T3ezXP olYYe0af/Tk30oW2C9aIFAZvFwrff96YkU8bN9pMAYh3d1sS0EK5tF54EHgmTp4cnTGb +NYdKKE70+GPZJWi75ZNzqJJc3VXAARPsc9rhy+qgPpO6xg0Ra114E3m1L8izo+6MLWR 9s1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=D3lFQz3wGc9gje8yZybA1phbAamoxnGnsNgPwPmWke4=; b=qVtwwauX9Ecg/Es/cM9FY+frjU4ZvvrK7TsmzRxgMV8MDR94nnYq2f1oxG5lofAhih LVsTVxFKIuQETL0FGhbv7HipeZ9pSVBXsgDU/E9UktLIvyfrAjcGJFcedOV6D3knV2C3 6rtwuCLADK39STksxCqeB8LjdSIM/rtANl7AKnb/Z+7HxtJPE0wB0wiL0Fq+fS0fRFTG 7fOEG8H8i91G2GKEneuCIGspV5IHIteneKT3uwsYANtDT0Yhm9ha2Md2ay7ckrEL5M1Q EJDDIEm1e54N9QBRm081r+AXjTZZV3HthJKqBewoscCabamSWeZuf7uOGfaftWZqtCOr kliQ== X-Gm-Message-State: APzg51CtaONBawlSfDR8akE54knwlD5vFm4vXVI0K+P/ll9tpHCENRmT +ylyXYE2TyfejJKn/gsWZnw= X-Google-Smtp-Source: ANB0VdaFcYkMG3EPc1qTEdfX1dLhiyNLzKbSR61zDtufAcZpgE7NaQKh5g4bRNLiYV1nOXS6D5BrEA== X-Received: by 2002:a63:b19:: with SMTP id 25-v6mr5999868pgl.301.1535848526350; Sat, 01 Sep 2018 17:35:26 -0700 (PDT) Received: from debian (1-64-81-037.static.netvigator.com. [1.64.81.37]) by smtp.gmail.com with ESMTPSA id g15-v6sm28364109pfg.98.2018.09.01.17.35.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Sep 2018 17:35:25 -0700 (PDT) From: Alex Vong Date: Sun, 02 Sep 2018 08:34:53 +0800 Message-ID: <87ftys3ff6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.8 (----) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello guix, I manage to fix all test failures of haskell-mode (which FTBFS for a long time). I use Jack's bug report as a starting point and continue from there. The fix consists of backporting 2 commits from upstream and hard-coding the filename in the tests. (This is okay since the tests will not be installed.)=20 Let's write some Haskell for good (`=EF=BD=A5=CF=89=EF=BD=A5=C2=B4) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-haskell-mode-Fix-test-failure.patch Content-Transfer-Encoding: quoted-printable From=2099fefcd43adbe8effe24480e64f9fa0b461b8fe5 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Sun, 2 Sep 2018 07:47:05 +0800 Subject: [PATCH] gnu: haskell-mode: Fix test failure. Thanks to Jack Hill for exploring differnt solutions at . * gnu/packages/patches/haskell-mode-Removed-unused-lexical-variables.patch, gnu/packages/patches/haskell-mode-removed-check-conventions-from-make.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/emacs.scm (haskell-mode)[source]: Use them. [arguments]: Adjust 'pre-build' phase to embed filename. =2D-- gnu/local.mk | 2 + gnu/packages/emacs.scm | 17 ++++--- ...ode-Removed-unused-lexical-variables.patch | 44 +++++++++++++++++++ ...-removed-check-conventions-from-make.patch | 35 +++++++++++++++ 4 files changed, 91 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/patches/haskell-mode-Removed-unused-lexica= l-variables.patch create mode 100644 gnu/packages/patches/haskell-mode-removed-check-convent= ions-from-make.patch diff --git a/gnu/local.mk b/gnu/local.mk index 91de38c5a..7bb88f151 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -791,6 +791,8 @@ dist_patch_DATA =3D \ %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \ %D%/packages/patches/gzdoom-search-in-installed-share.patch \ %D%/packages/patches/handbrake-pkg-config-path.patch \ + %D%/packages/patches/haskell-mode-Removed-unused-lexical-variables.patch= \ + %D%/packages/patches/haskell-mode-removed-check-conventions-from-make.pa= tch \ %D%/packages/patches/hdf4-architectures.patch \ %D%/packages/patches/hdf4-reproducibility.patch \ %D%/packages/patches/hdf4-shared-fortran.patch \ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index a1ce64ffa..b6121961d 100644 =2D-- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -646,7 +646,11 @@ only a handful of functions that are not resource-spec= ific.") "https://github.com/haskell/haskell-mode/archive/v" version ".tar.gz")) (sha256 =2D (base32 "0g6lcjw7lcgavv3yrd8xjcyqgfyjl787y32r1z14amw2f009= m78h")))) + (base32 "0g6lcjw7lcgavv3yrd8xjcyqgfyjl787y32r1z14amw2f009m7= 8h")) + (patches + (search-patches ; backport test failure fixes + "haskell-mode-Removed-unused-lexical-variables.patch" + "haskell-mode-removed-check-conventions-from-make.patch"))= )) (inputs `(("emacs-el-search" ,emacs-el-search) ; for tests ("emacs-stream" ,emacs-stream))) ; for tests @@ -686,12 +690,11 @@ only a handful of functions that are not resource-spe= cific.") (_ "")) inputs))) (substitute* (find-files "." "\\.el") (("/bin/sh") sh)) =2D (substitute* "tests/haskell-code-conventions.el" =2D ;; Function name recently changed in "emacs-el-search". =2D (("el-search--search-pattern") "el-search-forward") =2D ;; Don't contact home. =2D (("\\(when \\(>=3D emacs-major-version 25\\)") =2D "(require 'el-search) (when nil")) + ;; embed filename to fix test failure + (let ((file "tests/haskell-cabal-tests.el")) + (substitute* file + (("\\(buffer-file-name\\)") + (format #f "(or (buffer-file-name) ~s)" file)))) #t))) (replace 'install diff --git a/gnu/packages/patches/haskell-mode-Removed-unused-lexical-varia= bles.patch b/gnu/packages/patches/haskell-mode-Removed-unused-lexical-varia= bles.patch new file mode 100644 index 000000000..b175fae28 =2D-- /dev/null +++ b/gnu/packages/patches/haskell-mode-Removed-unused-lexical-variables.pa= tch @@ -0,0 +1,44 @@ +Copied verbatim from upstream repository. + +From cee22450ee30e79952f594796721dc6b17798ee6 Mon Sep 17 00:00:00 2001 +From: Sascha Wilde +Date: Fri, 23 Sep 2016 15:35:59 +0200 +Subject: [PATCH] Removed unused lexical variables. + +--- + haskell-lexeme.el | 3 +-- + haskell-process.el | 4 +--- + 2 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/haskell-lexeme.el b/haskell-lexeme.el +index 4256a79..b832560 100644 +--- a/haskell-lexeme.el ++++ b/haskell-lexeme.el +@@ -138,8 +138,7 @@ When match is successful, match-data will contain: + (match-text 2) - whole qualified identifier + (match-text 3) - unqualified part of identifier + (match-text 4) - closing backtick" +- (let ((begin (point)) +- (match-data-old (match-data)) ++ (let ((match-data-old (match-data)) + first-backtick-start + last-backtick-start + qid-start +diff --git a/haskell-process.el b/haskell-process.el +index b4efba2..4f3f859 100644 +--- a/haskell-process.el ++++ b/haskell-process.el +@@ -160,9 +160,7 @@ HPTYPE is the result of calling `'haskell-process-type= `' function." + (defun haskell-process-log (msg) + "Effective append MSG to the process log (if enabled)." + (when haskell-process-log +- (let* ((append-to (get-buffer-create "*haskell-process-log*")) +- (windows (get-buffer-window-list append-to t t)) +- move-point-in-windows) ++ (let* ((append-to (get-buffer-create "*haskell-process-log*"))) + (with-current-buffer append-to + ;; point should follow insertion so that it stays at the end + ;; of the buffer +--=20 +2.18.0 + diff --git a/gnu/packages/patches/haskell-mode-removed-check-conventions-fr= om-make.patch b/gnu/packages/patches/haskell-mode-removed-check-conventions= -from-make.patch new file mode 100644 index 000000000..a4d4d525f =2D-- /dev/null +++ b/gnu/packages/patches/haskell-mode-removed-check-conventions-from-make= .patch @@ -0,0 +1,35 @@ +Copied from upstream repository. +Hunk #2 is removed since it cannot be applied and it is not needed. + +From 7cead7137bf54851c1b7df5a3854351296d21276 Mon Sep 17 00:00:00 2001 +From: Vasantha Ganesh K +Date: Thu, 22 Jun 2017 23:38:40 +0530 +Subject: [PATCH] removed `check-conventions' from make + +--- + Makefile | 7 +- + tests/haskell-code-conventions.el | 165 ------------------------------ + 2 files changed, 1 insertion(+), 171 deletions(-) + delete mode 100644 tests/haskell-code-conventions.el + +diff --git a/Makefile b/Makefile +index b2c89d6..aa907c5 100644 +--- a/Makefile ++++ b/Makefile +@@ -79,12 +79,7 @@ build-$(EMACS_VERSION)/build-flag : build-$(EMACS_VERSI= ON) $(patsubst %.el,build + check-%: tests/%-tests.el + $(BATCH) -l "$<" -f ert-run-tests-batch-and-exit; +=20 +-check: compile $(AUTOLOADS) check-ert check-conventions +- +-check-conventions : +- $(BATCH) -l tests/haskell-code-conventions.el = \ +- -f haskell-check-conventions-batch-and-exit +- @echo "conventions are okay" ++check: compile $(AUTOLOADS) check-ert +=20 + check-ert: $(ELCHECKS) + $(BATCH) --eval "(when (=3D emacs-major-version 24) \ +--=20 +2.18.0 + =2D-=20 2.18.0 --=-=-= Content-Type: text/plain Cheers, Alex --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW4swLQAKCRDzrkvbI+za G141AQCtd6SfoIJ9ydwpL8dlJB1nzse5pJBHx78/hi8Tnhb0fQD9EO2SOzwb1PAj Eu19063KuCa+a0lB8aIjyWAjcSRJ7ws= =skK5 -----END PGP SIGNATURE----- --==-=-=-- From unknown Fri Sep 12 00:24:48 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Alex Vong Subject: bug#32608: closed (Re: [bug#32608] [PATCH] gnu: haskell-mode: Fix test failure.) Message-ID: References: <87r2ic6iou.fsf@gnu.org> <87ftys3ff6.fsf@gmail.com> X-Gnu-PR-Message: they-closed 32608 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 32608@debbugs.gnu.org Date: Sun, 02 Sep 2018 15:09:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1535900943-11220-1" This is a multi-part message in MIME format... ------------=_1535900943-11220-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #32608: [PATCH] gnu: haskell-mode: Fix test failure. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 32608@debbugs.gnu.org. --=20 32608: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D32608 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1535900943-11220-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 32608-done) by debbugs.gnu.org; 2 Sep 2018 15:08:38 +0000 Received: from localhost ([127.0.0.1]:43174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwTzN-0002to-9W for submit@debbugs.gnu.org; Sun, 02 Sep 2018 11:08:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwTzL-0002tU-Se for 32608-done@debbugs.gnu.org; Sun, 02 Sep 2018 11:08:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwTzF-0006GP-TL for 32608-done@debbugs.gnu.org; Sun, 02 Sep 2018 11:08:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwTz8-0006CP-SB; Sun, 02 Sep 2018 11:08:18 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=40776 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fwTz8-0005ne-Kx; Sun, 02 Sep 2018 11:08:18 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Alex Vong Subject: Re: [bug#32608] [PATCH] gnu: haskell-mode: Fix test failure. References: <87ftys3ff6.fsf@gmail.com> Date: Sun, 02 Sep 2018 17:08:17 +0200 In-Reply-To: <87ftys3ff6.fsf@gmail.com> (Alex Vong's message of "Sun, 02 Sep 2018 08:34:53 +0800") Message-ID: <87r2ic6iou.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32608-done Cc: 32608-done@debbugs.gnu.org, 31726-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi Alex, Alex Vong skribis: > I manage to fix all test failures of haskell-mode (which FTBFS for a > long time). I use Jack's bug report > as a starting > point and continue from there. The fix consists of backporting 2 commits > from upstream and hard-coding the filename in the tests. (This is okay > since the tests will not be installed.)=20 Awesome. > Let's write some Haskell for good (`=EF=BD=A5=CF=89=EF=BD=A5=C2=B4) :-) > From 99fefcd43adbe8effe24480e64f9fa0b461b8fe5 Mon Sep 17 00:00:00 2001 > From: Alex Vong > Date: Sun, 2 Sep 2018 07:47:05 +0800 > Subject: [PATCH] gnu: haskell-mode: Fix test failure. > > Thanks to Jack Hill for exploring differnt solutio= ns > at . > > * gnu/packages/patches/haskell-mode-Removed-unused-lexical-variables.patc= h, > gnu/packages/patches/haskell-mode-removed-check-conventions-from-make.pat= ch: > New files. > * gnu/local.mk (dist_patch_DATA): Add them. > * gnu/packages/emacs.scm (haskell-mode)[source]: Use them. > [arguments]: Adjust 'pre-build' phase to embed filename. I=E2=80=99ve shorted the patch file names as suggested by =E2=80=98guix lin= t=E2=80=99, added a =E2=80=9CFixes=E2=80=9D line in the commit log, and applied. Thanks to both of you! Ludo=E2=80=99. ------------=_1535900943-11220-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 2 Sep 2018 00:35:52 +0000 Received: from localhost ([127.0.0.1]:42242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwGMj-0004g2-ES for submit@debbugs.gnu.org; Sat, 01 Sep 2018 20:35:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fwGMe-0004fi-H5 for submit@debbugs.gnu.org; Sat, 01 Sep 2018 20:35:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwGMY-0004YP-3N for submit@debbugs.gnu.org; Sat, 01 Sep 2018 20:35:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50425) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fwGMX-0004Ws-RN for submit@debbugs.gnu.org; Sat, 01 Sep 2018 20:35:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwGMV-0003HR-TK for guix-patches@gnu.org; Sat, 01 Sep 2018 20:35:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwGMR-0004OI-QM for guix-patches@gnu.org; Sat, 01 Sep 2018 20:35:31 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:37734) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fwGMR-0004NQ-FX for guix-patches@gnu.org; Sat, 01 Sep 2018 20:35:27 -0400 Received: by mail-pf1-x42f.google.com with SMTP id h69-v6so7125028pfd.4 for ; Sat, 01 Sep 2018 17:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=D3lFQz3wGc9gje8yZybA1phbAamoxnGnsNgPwPmWke4=; b=QuRZFSscuOHiP9H8tIhZGfsBE1Rk7XCsfxMYKVoGQ4sOADx5z6Kfe4jqr9rZR4bXd/ k+t8sVndmbHUk9LKdRAuf6dK55BgWHz1AN3hiSjGmLj5/+FNNhfzuK83JEiSa9YilhRw RYcUech6JovLz7o2S18fQ77wMkGRNUgyFGtLuSkF+u5iM6yXomtPNxv/30Gmp7T3ezXP olYYe0af/Tk30oW2C9aIFAZvFwrff96YkU8bN9pMAYh3d1sS0EK5tF54EHgmTp4cnTGb +NYdKKE70+GPZJWi75ZNzqJJc3VXAARPsc9rhy+qgPpO6xg0Ra114E3m1L8izo+6MLWR 9s1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=D3lFQz3wGc9gje8yZybA1phbAamoxnGnsNgPwPmWke4=; b=qVtwwauX9Ecg/Es/cM9FY+frjU4ZvvrK7TsmzRxgMV8MDR94nnYq2f1oxG5lofAhih LVsTVxFKIuQETL0FGhbv7HipeZ9pSVBXsgDU/E9UktLIvyfrAjcGJFcedOV6D3knV2C3 6rtwuCLADK39STksxCqeB8LjdSIM/rtANl7AKnb/Z+7HxtJPE0wB0wiL0Fq+fS0fRFTG 7fOEG8H8i91G2GKEneuCIGspV5IHIteneKT3uwsYANtDT0Yhm9ha2Md2ay7ckrEL5M1Q EJDDIEm1e54N9QBRm081r+AXjTZZV3HthJKqBewoscCabamSWeZuf7uOGfaftWZqtCOr kliQ== X-Gm-Message-State: APzg51CtaONBawlSfDR8akE54knwlD5vFm4vXVI0K+P/ll9tpHCENRmT +ylyXYE2TyfejJKn/gsWZnw= X-Google-Smtp-Source: ANB0VdaFcYkMG3EPc1qTEdfX1dLhiyNLzKbSR61zDtufAcZpgE7NaQKh5g4bRNLiYV1nOXS6D5BrEA== X-Received: by 2002:a63:b19:: with SMTP id 25-v6mr5999868pgl.301.1535848526350; Sat, 01 Sep 2018 17:35:26 -0700 (PDT) Received: from debian (1-64-81-037.static.netvigator.com. [1.64.81.37]) by smtp.gmail.com with ESMTPSA id g15-v6sm28364109pfg.98.2018.09.01.17.35.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Sep 2018 17:35:25 -0700 (PDT) From: Alex Vong To: guix-patches@gnu.org Subject: [PATCH] gnu: haskell-mode: Fix test failure. Date: Sun, 02 Sep 2018 08:34:53 +0800 Message-ID: <87ftys3ff6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.8 (----) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello guix, I manage to fix all test failures of haskell-mode (which FTBFS for a long time). I use Jack's bug report as a starting point and continue from there. The fix consists of backporting 2 commits from upstream and hard-coding the filename in the tests. (This is okay since the tests will not be installed.)=20 Let's write some Haskell for good (`=EF=BD=A5=CF=89=EF=BD=A5=C2=B4) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-haskell-mode-Fix-test-failure.patch Content-Transfer-Encoding: quoted-printable From=2099fefcd43adbe8effe24480e64f9fa0b461b8fe5 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Sun, 2 Sep 2018 07:47:05 +0800 Subject: [PATCH] gnu: haskell-mode: Fix test failure. Thanks to Jack Hill for exploring differnt solutions at . * gnu/packages/patches/haskell-mode-Removed-unused-lexical-variables.patch, gnu/packages/patches/haskell-mode-removed-check-conventions-from-make.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/emacs.scm (haskell-mode)[source]: Use them. [arguments]: Adjust 'pre-build' phase to embed filename. =2D-- gnu/local.mk | 2 + gnu/packages/emacs.scm | 17 ++++--- ...ode-Removed-unused-lexical-variables.patch | 44 +++++++++++++++++++ ...-removed-check-conventions-from-make.patch | 35 +++++++++++++++ 4 files changed, 91 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/patches/haskell-mode-Removed-unused-lexica= l-variables.patch create mode 100644 gnu/packages/patches/haskell-mode-removed-check-convent= ions-from-make.patch diff --git a/gnu/local.mk b/gnu/local.mk index 91de38c5a..7bb88f151 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -791,6 +791,8 @@ dist_patch_DATA =3D \ %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \ %D%/packages/patches/gzdoom-search-in-installed-share.patch \ %D%/packages/patches/handbrake-pkg-config-path.patch \ + %D%/packages/patches/haskell-mode-Removed-unused-lexical-variables.patch= \ + %D%/packages/patches/haskell-mode-removed-check-conventions-from-make.pa= tch \ %D%/packages/patches/hdf4-architectures.patch \ %D%/packages/patches/hdf4-reproducibility.patch \ %D%/packages/patches/hdf4-shared-fortran.patch \ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index a1ce64ffa..b6121961d 100644 =2D-- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -646,7 +646,11 @@ only a handful of functions that are not resource-spec= ific.") "https://github.com/haskell/haskell-mode/archive/v" version ".tar.gz")) (sha256 =2D (base32 "0g6lcjw7lcgavv3yrd8xjcyqgfyjl787y32r1z14amw2f009= m78h")))) + (base32 "0g6lcjw7lcgavv3yrd8xjcyqgfyjl787y32r1z14amw2f009m7= 8h")) + (patches + (search-patches ; backport test failure fixes + "haskell-mode-Removed-unused-lexical-variables.patch" + "haskell-mode-removed-check-conventions-from-make.patch"))= )) (inputs `(("emacs-el-search" ,emacs-el-search) ; for tests ("emacs-stream" ,emacs-stream))) ; for tests @@ -686,12 +690,11 @@ only a handful of functions that are not resource-spe= cific.") (_ "")) inputs))) (substitute* (find-files "." "\\.el") (("/bin/sh") sh)) =2D (substitute* "tests/haskell-code-conventions.el" =2D ;; Function name recently changed in "emacs-el-search". =2D (("el-search--search-pattern") "el-search-forward") =2D ;; Don't contact home. =2D (("\\(when \\(>=3D emacs-major-version 25\\)") =2D "(require 'el-search) (when nil")) + ;; embed filename to fix test failure + (let ((file "tests/haskell-cabal-tests.el")) + (substitute* file + (("\\(buffer-file-name\\)") + (format #f "(or (buffer-file-name) ~s)" file)))) #t))) (replace 'install diff --git a/gnu/packages/patches/haskell-mode-Removed-unused-lexical-varia= bles.patch b/gnu/packages/patches/haskell-mode-Removed-unused-lexical-varia= bles.patch new file mode 100644 index 000000000..b175fae28 =2D-- /dev/null +++ b/gnu/packages/patches/haskell-mode-Removed-unused-lexical-variables.pa= tch @@ -0,0 +1,44 @@ +Copied verbatim from upstream repository. + +From cee22450ee30e79952f594796721dc6b17798ee6 Mon Sep 17 00:00:00 2001 +From: Sascha Wilde +Date: Fri, 23 Sep 2016 15:35:59 +0200 +Subject: [PATCH] Removed unused lexical variables. + +--- + haskell-lexeme.el | 3 +-- + haskell-process.el | 4 +--- + 2 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/haskell-lexeme.el b/haskell-lexeme.el +index 4256a79..b832560 100644 +--- a/haskell-lexeme.el ++++ b/haskell-lexeme.el +@@ -138,8 +138,7 @@ When match is successful, match-data will contain: + (match-text 2) - whole qualified identifier + (match-text 3) - unqualified part of identifier + (match-text 4) - closing backtick" +- (let ((begin (point)) +- (match-data-old (match-data)) ++ (let ((match-data-old (match-data)) + first-backtick-start + last-backtick-start + qid-start +diff --git a/haskell-process.el b/haskell-process.el +index b4efba2..4f3f859 100644 +--- a/haskell-process.el ++++ b/haskell-process.el +@@ -160,9 +160,7 @@ HPTYPE is the result of calling `'haskell-process-type= `' function." + (defun haskell-process-log (msg) + "Effective append MSG to the process log (if enabled)." + (when haskell-process-log +- (let* ((append-to (get-buffer-create "*haskell-process-log*")) +- (windows (get-buffer-window-list append-to t t)) +- move-point-in-windows) ++ (let* ((append-to (get-buffer-create "*haskell-process-log*"))) + (with-current-buffer append-to + ;; point should follow insertion so that it stays at the end + ;; of the buffer +--=20 +2.18.0 + diff --git a/gnu/packages/patches/haskell-mode-removed-check-conventions-fr= om-make.patch b/gnu/packages/patches/haskell-mode-removed-check-conventions= -from-make.patch new file mode 100644 index 000000000..a4d4d525f =2D-- /dev/null +++ b/gnu/packages/patches/haskell-mode-removed-check-conventions-from-make= .patch @@ -0,0 +1,35 @@ +Copied from upstream repository. +Hunk #2 is removed since it cannot be applied and it is not needed. + +From 7cead7137bf54851c1b7df5a3854351296d21276 Mon Sep 17 00:00:00 2001 +From: Vasantha Ganesh K +Date: Thu, 22 Jun 2017 23:38:40 +0530 +Subject: [PATCH] removed `check-conventions' from make + +--- + Makefile | 7 +- + tests/haskell-code-conventions.el | 165 ------------------------------ + 2 files changed, 1 insertion(+), 171 deletions(-) + delete mode 100644 tests/haskell-code-conventions.el + +diff --git a/Makefile b/Makefile +index b2c89d6..aa907c5 100644 +--- a/Makefile ++++ b/Makefile +@@ -79,12 +79,7 @@ build-$(EMACS_VERSION)/build-flag : build-$(EMACS_VERSI= ON) $(patsubst %.el,build + check-%: tests/%-tests.el + $(BATCH) -l "$<" -f ert-run-tests-batch-and-exit; +=20 +-check: compile $(AUTOLOADS) check-ert check-conventions +- +-check-conventions : +- $(BATCH) -l tests/haskell-code-conventions.el = \ +- -f haskell-check-conventions-batch-and-exit +- @echo "conventions are okay" ++check: compile $(AUTOLOADS) check-ert +=20 + check-ert: $(ELCHECKS) + $(BATCH) --eval "(when (=3D emacs-major-version 24) \ +--=20 +2.18.0 + =2D-=20 2.18.0 --=-=-= Content-Type: text/plain Cheers, Alex --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW4swLQAKCRDzrkvbI+za G141AQCtd6SfoIJ9ydwpL8dlJB1nzse5pJBHx78/hi8Tnhb0fQD9EO2SOzwb1PAj Eu19063KuCa+a0lB8aIjyWAjcSRJ7ws= =skK5 -----END PGP SIGNATURE----- --==-=-=-- ------------=_1535900943-11220-1--