all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#32809] [PATCH 0/1] import: hackage: Do not repeat inputs in native-inputs.
@ 2018-09-22 17:18 Arun Isaac
  2018-09-22 17:27 ` [bug#32809] [PATCH 1/1] " Arun Isaac
  0 siblings, 1 reply; 6+ messages in thread
From: Arun Isaac @ 2018-09-22 17:18 UTC (permalink / raw)
  To: 32809

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#32809] [PATCH 1/1] import: hackage: Do not repeat inputs in native-inputs.
  2018-09-22 17:18 [bug#32809] [PATCH 0/1] import: hackage: Do not repeat inputs in native-inputs Arun Isaac
@ 2018-09-22 17:27 ` Arun Isaac
  2018-09-23 15:10   ` Danny Milosavljevic
  0 siblings, 1 reply; 6+ messages in thread
From: Arun Isaac @ 2018-09-22 17:27 UTC (permalink / raw)
  To: 32809

* 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#32809] [PATCH 1/1] import: hackage: Do not repeat inputs in native-inputs.
  2018-09-22 17:27 ` [bug#32809] [PATCH 1/1] " Arun Isaac
@ 2018-09-23 15:10   ` Danny Milosavljevic
  2018-09-25  6:15     ` Arun Isaac
  0 siblings, 1 reply; 6+ messages in thread
From: Danny Milosavljevic @ 2018-09-23 15:10 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 32809

[-- Attachment #1: Type: text/plain, Size: 417 bytes --]

On Sat, 22 Sep 2018 22:57:57 +0530
Arun Isaac <arunisaac@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)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#32809] [PATCH 1/1] import: hackage: Do not repeat inputs in native-inputs.
  2018-09-23 15:10   ` Danny Milosavljevic
@ 2018-09-25  6:15     ` Arun Isaac
  2018-10-27 18:16       ` Ricardo Wurmus
  0 siblings, 1 reply; 6+ messages in thread
From: Arun Isaac @ 2018-09-25  6:15 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: Ricardo Wurmus, 32809


>> * 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#32809] [PATCH 1/1] import: hackage: Do not repeat inputs in native-inputs.
  2018-09-25  6:15     ` Arun Isaac
@ 2018-10-27 18:16       ` Ricardo Wurmus
  2018-10-28  9:16         ` bug#32809: " Arun Isaac
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2018-10-27 18:16 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 32809


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#32809: [PATCH 1/1] import: hackage: Do not repeat inputs in native-inputs.
  2018-10-27 18:16       ` Ricardo Wurmus
@ 2018-10-28  9:16         ` Arun Isaac
  0 siblings, 0 replies; 6+ messages in thread
From: Arun Isaac @ 2018-10-28  9:16 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 32809-done


> In short: the patch looks good to me.

Pushed, thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-28  9:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-22 17:18 [bug#32809] [PATCH 0/1] import: hackage: Do not repeat inputs in native-inputs Arun Isaac
2018-09-22 17:27 ` [bug#32809] [PATCH 1/1] " Arun Isaac
2018-09-23 15:10   ` Danny Milosavljevic
2018-09-25  6:15     ` Arun Isaac
2018-10-27 18:16       ` Ricardo Wurmus
2018-10-28  9:16         ` bug#32809: " Arun Isaac

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.