GNU bug report logs - #32809
[PATCH 0/1] import: hackage: Do not repeat inputs in native-inputs.

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Sat, 22 Sep 2018 17:20:01 UTC

Severity: normal

Tags: patch

Done: Arun Isaac <arunisaac <at> systemreboot.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32809 in the body.
You can then email your comments to 32809 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#32809; Package guix-patches. (Sat, 22 Sep 2018 17:20:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arun Isaac <arunisaac <at> systemreboot.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 22 Sep 2018 17:20:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: guix-patches <at> gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [PATCH 0/1] import: hackage: Do not repeat inputs in native-inputs.
Date: Sat, 22 Sep 2018 22:48:48 +0530
Tha hackage importer lists packages in native-inputs even if they have already
been listed in inputs. This should not be. The following patch fixes this.

As an illustration of what I mean, look at the difference when importing the
hackage package test-framework with and without this patch applied.

Arun Isaac (1):
  import: hackage: Do not repeat inputs in native-inputs.

 guix/import/hackage.scm | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

-- 
2.19.0





Information forwarded to guix-patches <at> gnu.org:
bug#32809; Package guix-patches. (Sat, 22 Sep 2018 17:29:02 GMT) Full text and rfc822 format available.

Message #8 received at 32809 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 32809 <at> debbugs.gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [PATCH 1/1] import: hackage: Do not repeat inputs in native-inputs.
Date: Sat, 22 Sep 2018 22:57:57 +0530
* guix/import/hackage.scm (hackage-module->sexp): Do not repeat inputs again
in native-inputs. native-inputs should only contain packages that are not
already listed in inputs.
---
 guix/import/hackage.scm | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index 766a0b53f..48db764b3 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -215,15 +215,18 @@ representation of a Cabal file as produced by 'read-cabal'."
      cabal))
 
   (define hackage-native-dependencies
-    ((compose (cut filter-dependencies <>
-                   (cabal-package-name cabal))
-              ;; FIXME: Check include-test-dependencies?
-              (lambda (cabal)
-                (append (if include-test-dependencies?
-                            (cabal-test-dependencies->names cabal)
-                            '())
-                        (cabal-custom-setup-dependencies->names cabal))))
-     cabal))
+    (lset-difference
+     equal?
+     ((compose (cut filter-dependencies <>
+                    (cabal-package-name cabal))
+               ;; FIXME: Check include-test-dependencies?
+               (lambda (cabal)
+                 (append (if include-test-dependencies?
+                             (cabal-test-dependencies->names cabal)
+                             '())
+                         (cabal-custom-setup-dependencies->names cabal))))
+      cabal)
+     hackage-dependencies))
 
   (define dependencies
     (map (lambda (name)
-- 
2.19.0





Information forwarded to guix-patches <at> gnu.org:
bug#32809; Package guix-patches. (Sun, 23 Sep 2018 15:11:02 GMT) Full text and rfc822 format available.

Message #11 received at 32809 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 32809 <at> debbugs.gnu.org
Subject: Re: [bug#32809] [PATCH 1/1] import: hackage: Do not repeat inputs
 in native-inputs.
Date: Sun, 23 Sep 2018 17:10:50 +0200
[Message part 1 (text/plain, inline)]
On Sat, 22 Sep 2018 22:57:57 +0530
Arun Isaac <arunisaac <at> systemreboot.net> wrote:

> * guix/import/hackage.scm (hackage-module->sexp): Do not repeat inputs again
> in native-inputs. native-inputs should only contain packages that are not
> already listed in inputs.

Aha?  When cross-compiling, will guix provide all the tools natively that are
listed in inputs? (rather than just the ones in native-inputs)
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32809; Package guix-patches. (Tue, 25 Sep 2018 06:16:02 GMT) Full text and rfc822 format available.

Message #14 received at 32809 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Ricardo Wurmus <rekado <at> elephly.net>, 32809 <at> debbugs.gnu.org
Subject: Re: [bug#32809] [PATCH 1/1] import: hackage: Do not repeat inputs in
 native-inputs.
Date: Tue, 25 Sep 2018 11:45:04 +0530
>> * guix/import/hackage.scm (hackage-module->sexp): Do not repeat inputs again
>> in native-inputs. native-inputs should only contain packages that are not
>> already listed in inputs.
>
> Aha?  When cross-compiling, will guix provide all the tools natively that are
> listed in inputs? (rather than just the ones in native-inputs)

That's a good question. I did not think of it, and I don't know the
answer. Whenever I have packaged any package (Haskell packages,
included) for Guix, I have taken care to not repeat the inputs in the
native-inputs. Now that you mention this, I don't know if that was the
right thing to do. WDYT?

I have CCed Ricardo in this mail.




Information forwarded to guix-patches <at> gnu.org:
bug#32809; Package guix-patches. (Sat, 27 Oct 2018 20:03:01 GMT) Full text and rfc822 format available.

Message #17 received at 32809 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 32809 <at> debbugs.gnu.org
Subject: Re: [bug#32809] [PATCH 1/1] import: hackage: Do not repeat inputs in
 native-inputs.
Date: Sat, 27 Oct 2018 20:16:12 +0200
Hi Arun,

>>> * guix/import/hackage.scm (hackage-module->sexp): Do not repeat inputs again
>>> in native-inputs. native-inputs should only contain packages that are not
>>> already listed in inputs.
>>
>> Aha?  When cross-compiling, will guix provide all the tools natively that are
>> listed in inputs? (rather than just the ones in native-inputs)
>
> That's a good question. I did not think of it, and I don't know the
> answer. Whenever I have packaged any package (Haskell packages,
> included) for Guix, I have taken care to not repeat the inputs in the
> native-inputs. Now that you mention this, I don't know if that was the
> right thing to do. WDYT?

Currently, the haskell-build-system says this about cross-building
packages:

    XXX: no cross-compilation

Until we have patches to add proper cross-compilation support to the
Haskell build system, I’d prefer to let the importer only keep packages
that are not already listed in the inputs.

This is probably the right thing to do.  It may even be correct to have
all Haskell *libraries* among the regular inputs and only test *tools*
be build-host native.

The Cabal format does not differ between these cases.  It only supports
specifications of different build targets with arbitrary names and
usually with full lists of dependencies, even if the dependencies might
be duplicates of those used for other build targets.

In short: the patch looks good to me.

Thanks!

--
Ricardo





Reply sent to Arun Isaac <arunisaac <at> systemreboot.net>:
You have taken responsibility. (Sun, 28 Oct 2018 09:17:02 GMT) Full text and rfc822 format available.

Notification sent to Arun Isaac <arunisaac <at> systemreboot.net>:
bug acknowledged by developer. (Sun, 28 Oct 2018 09:17:02 GMT) Full text and rfc822 format available.

Message #22 received at 32809-done <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 32809-done <at> debbugs.gnu.org
Subject: Re: [bug#32809] [PATCH 1/1] import: hackage: Do not repeat inputs in
 native-inputs.
Date: Sun, 28 Oct 2018 14:46:00 +0530
> In short: the patch looks good to me.

Pushed, thanks!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 25 Nov 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.