From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +F7AJO6lmGIbjAAAbAwnHQ (envelope-from ) for ; Thu, 02 Jun 2022 13:58:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2L6jJO6lmGK0JgAAauVa8A (envelope-from ) for ; Thu, 02 Jun 2022 13:58:38 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 00CF432B50 for ; Thu, 2 Jun 2022 13:58:36 +0200 (CEST) Received: from localhost ([::1]:56786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwjTH-0008LQ-Vg for larch@yhetil.org; Thu, 02 Jun 2022 07:58:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwjSk-0008H3-7K for bug-guix@gnu.org; Thu, 02 Jun 2022 07:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59074) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwjSj-00017E-P0 for bug-guix@gnu.org; Thu, 02 Jun 2022 07:58:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwjSj-0006cc-ME for bug-guix@gnu.org; Thu, 02 Jun 2022 07:58:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#54760: import: hackage: Internal libraries are not filtered out of dependency list Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 02 Jun 2022 11:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54760 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Philip Munksgaard Cc: 54760@debbugs.gnu.org Received: via spool by 54760-submit@debbugs.gnu.org id=B54760.165417103925389 (code B ref 54760); Thu, 02 Jun 2022 11:58:01 +0000 Received: (at 54760) by debbugs.gnu.org; 2 Jun 2022 11:57:19 +0000 Received: from localhost ([127.0.0.1]:52971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwjS2-0006bQ-Ip for submit@debbugs.gnu.org; Thu, 02 Jun 2022 07:57:19 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:43736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwjRw-0006b7-Lg for 54760@debbugs.gnu.org; Thu, 02 Jun 2022 07:57:17 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4LDPdD4kjSz9scB; Thu, 2 Jun 2022 13:57:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1654171024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ab6MF/klDadRxk/3sY0QLwvgCgtzRTGJ0Ic0JOb/zNc=; b=JCQks8/rLqwRZe1dsNdz0XbMVf3zK70ufBnTFd8IFX6GaIm7yy1IH7Menjo+juAmPCZXL5 2FhOcOlL7ZvdjEwOQ+kTR2Sk7a22TYNGbbSdHIGEU/7vYmEcl/6H6t4rCsNTld25i40wUM hK67lm8JalL4fqOsgMHClH7DctkakWyxDPM09fu5mZeuTzpeeYiKoMd7d5c3xyiBiXYEr0 R0wi2bIcHyFWmTMl3zfF8TSHg5ExQadpP8Fa8WSO0Y37R+G0mfaMhbJ5+XlvzaGwjIPjfL 0Wvws8rokHpa9Iib5HZ5AWsivu3CfU/OgZk5WfuN8/jXXe/H5Kq3ddbrJW/BYQ== Date: Thu, 2 Jun 2022 13:57:02 +0200 From: Lars-Dominik Braun Message-ID: References: <842828ff-b80b-4488-aa5b-5e6189e0a607@www.fastmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="m0ZxJ2nEkC5P23C7" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: 4LDPdD4kjSz9scB X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654171117; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Ab6MF/klDadRxk/3sY0QLwvgCgtzRTGJ0Ic0JOb/zNc=; b=jpP+bv/7UvpFoKegKxB9mMtAouy+XkKXffdbMwSxsohXjyZx6Tw9YGf3QlIu1vXtHJaGiT 1YeyMT8oEslAT+R4XNm+jdGziME68RfQdsa1LWLSvqCRNU9s/NCaB/YNjiCMNaJtKQrDh0 5wZpf2iJoceWItwxxlHuLjYC5jGaf0MxDW3Cy+Q4Oj7voC3WM1mvSq/6S6KmcZ9//YsMLw NqNQ+YQifOMRyymk96ArUxtuglLT+IvrfddiOr+TOl7au5Xk9zoTXECEzLEC6PvlWbeRKu t7y1cGbNAqetwr4Oi+V7HFNib4mZ7CMjW+fKaUIiYOw4ZBnrQhqbdCT8EWHbQA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654171117; a=rsa-sha256; cv=none; b=QZ9JUzc1L68yG9bVTWah22Izq7nTX9VEdRHUL9tK0lzApuAVBLsRwbhDzTfu6SVhG0HLC4 5ndRYkTVb5Xfy4qM87cN9OEbjBXWU7nfq/w3r00aLyB3ZhOVPUc6BID0FzsH1re5spXQKY Nfvjaga2fxgcWZ7BSFV8hL7BmwUBQKk5GOjPAey1PJ4DOGCofE1KyHtpBH8o+JY3K01Nli CcKM/+GNyZjV+u0njSLrMd5psMY21N8XimSHKTLIEyTp4a4/FTIwko8VjdnSBbudH8FbxN fG9erGzNj31Yk9jo4/P7iZ4ciwxU4YS+TKsKpMNtMNxXNk22QYSbLHlXwiHcZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b="JCQks8/r"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b="JCQks8/r"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 00CF432B50 X-Spam-Score: 5.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: gQkceG80eq0z --m0ZxJ2nEkC5P23C7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hey, > Indeed, that seems to work for those packages, but it still doesn't seem to work for OneTuple, as mentioned here: I’m attaching a patch for that, please have a look. I’ll merge these into master, since they don’t change any builds. > Aha! The upgrade to GHC 9.0.0 caused ghc-hashable to break. I suppose many other packages could be broken as well. I didn’t actually upgrade any packages on wip-haskell yet, so it’s likely they fail with a newer GHC than 8.10. Cheers, Lars --m0ZxJ2nEkC5P23C7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-import-hackage-Filter-upper-mixed-case-dependencies-.patch" >From 261736187d51c85c203ad08fbc1ae89340256a8c Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 2 Jun 2022 13:52:08 +0200 Subject: [PATCH] import: hackage: Filter upper/mixed case dependencies too. * guix/import/hackage.scm (filter-dependencies): Convert OWN-NAMES to lowercase before filtering. (hackage-module->sexp): Remove #f from OWN-NAMES, which is used for unnamed (default) libraries. * tests/hackage.scm (test-cabal-internal-library-ignored): Add mismatched uppercase letters. --- guix/import/hackage.scm | 8 +++++--- tests/hackage.scm | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index 6e982366cf..878a7d2f9c 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -227,9 +227,10 @@ (define (filter-dependencies dependencies own-names) list with the names of dependencies. OWN-NAMES is the name of the Cabal package being processed and its internal libaries and is used to filter references to itself." - (filter (lambda (d) (not (member (string-downcase d) + (let ((ignored-dependencies (map string-downcase (append own-names ghc-standard-libraries)))) - dependencies)) + (filter (lambda (d) (not (member (string-downcase d) ignored-dependencies))) + dependencies))) (define* (hackage-module->sexp cabal cabal-hash #:key (include-test-dependencies? #t)) @@ -250,7 +251,8 @@ (define source-url (hackage-source-url name version)) (define own-names (cons (cabal-package-name cabal) - (map cabal-library-name (cabal-package-library cabal)))) + (filter (lambda (x) (not (eqv? x #f))) + (map cabal-library-name (cabal-package-library cabal))))) (define hackage-dependencies (filter-dependencies (cabal-dependencies->names cabal) own-names)) diff --git a/tests/hackage.scm b/tests/hackage.scm index a11dd14846..ad2ee4b7f9 100644 --- a/tests/hackage.scm +++ b/tests/hackage.scm @@ -368,7 +368,8 @@ (define test-cabal-no-final-newline (test-assert "hackage->guix-package test without final newline" (eval-test-with-cabal test-cabal-no-final-newline match-ghc-foo)) -;; Make sure internal libraries will not be part of the dependencies. +;; Make sure internal libraries will not be part of the dependencies, +;; ignore case. (define test-cabal-internal-library-ignored "name: foo version: 1.0.0 @@ -379,8 +380,8 @@ (define test-cabal-internal-library-ignored executable cabal build-depends: HTTP >= 4000.2.5 && < 4000.3, - internal -library internal + internAl +library internaL build-depends: mtl >= 2.0 && < 3 ") -- 2.35.1 --m0ZxJ2nEkC5P23C7--