GNU bug report logs - #66076
[PATCH v2 10/23] DRAFT import: juliahub: Simplify juliahub dependency management.

Previous Next

Package: guix-patches;

Reported by: Simon Tournier <zimon.toutoune <at> gmail.com>

Date: Mon, 18 Sep 2023 18:06:02 UTC

Severity: normal

Tags: patch

Merged with 66075, 66077, 66078, 66079, 66080, 66081, 66082, 66083, 66084, 66085, 66086, 66087, 66088, 66089, 66090, 66091, 66092

Done: Simon Tournier <zimon.toutoune <at> gmail.com>

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 66076 in the body.
You can then email your comments to 66076 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#66076; Package guix-patches. (Mon, 18 Sep 2023 18:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Simon Tournier <zimon.toutoune <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 18 Sep 2023 18:06:03 GMT) Full text and rfc822 format available.

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

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: 62202 <at> debbugs.gnu.org
Cc: Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org>,
 Simon Tournier <zimon.toutoune <at> gmail.com>
Subject: [PATCH v2 10/23] DRAFT import: juliahub: Simplify juliahub dependency
 management.
Date: Mon, 18 Sep 2023 20:03:17 +0200
From: Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org>

Signed-off-by: Simon Tournier <zimon.toutoune <at> gmail.com>
---
 guix/import/juliahub.scm | 42 ++++++++++++++--------------------------
 1 file changed, 14 insertions(+), 28 deletions(-)

diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index af08f3d698d0..b1eeb736a824 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -100,26 +100,13 @@ (define (juliahub-slug-version name)
          (latest-version (string-drop uri 6)))
     `(,slug ,latest-version)))
 
-(define (json->juliahub-direct-dependencies vector)
+(define (json->juliahub-dependencies vector)
   (if (vector? vector)
       (filter-map
        (lambda (el)
          (let ((dep (json->juliahub-dependency el)))
-           (if (and (juliahub-dependency-direct? dep)
-                    (not (member (juliahub-dependency-name dep)
-                                 %julia-stdlibs)))
-               dep
-               #f)))
-       (vector->list vector))))
-
-(define (json->juliahub-indirect-dependencies vector)
-  (if (vector? vector)
-      (filter-map
-       (lambda (el)
-         (let ((dep (json->juliahub-dependency el)))
-           (if (and (not (juliahub-dependency-direct? dep))
-                    (not (member (juliahub-dependency-name dep)
-                                 %julia-stdlibs)))
+           (if (not (member (juliahub-dependency-name dep)
+                            %julia-stdlibs))
                dep
                #f)))
        (vector->list vector))))
@@ -157,12 +144,9 @@ (define-json-mapping <juliahub-package> make-juliahub-package juliahub-package?
   (readme juliahub-package-readme) ;string
   (version juliahub-package-version) ;string
   (description juliahub-package-description) ;string
-  (direct-dependencies
-   juliahub-package-direct-dependencies "deps"
-   json->juliahub-direct-dependencies) ;list of <juliahub-dependency>
-  (indirect-dependencies
-   juliahub-package-indirect-dependencies "deps"
-   json->juliahub-indirect-dependencies) ;list of <juliahub-dependency>
+  (dependencies
+   juliahub-package-dependencies "deps"
+   json->juliahub-dependencies) ;list of <juliahub-dependency>
   (url juliahub-package-url) ;string
   (uuid juliahub-package-uuid) ;string
   (license juliahub-package-license)) ;string
@@ -184,7 +168,7 @@ (define* (juliahub-fetch name #:key (version #f))
          json->juliahub-package))
 
 (define (make-julia-sexp name source home-page synopsis description
-                         direct-dependencies test-dependencies-names licenses)
+                         dependencies test-dependencies-names licenses)
   "Return the `package' s-expression for a Julia package with the given NAME,
 VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES,
 TEST-DEPENDENCIES-NAMES and LICENSES."
@@ -193,11 +177,13 @@ (define (make-julia-sexp name source home-page synopsis description
      (version ,version)
      (source ,source)
      (build-system julia-build-system)
-     ,@(if (null? direct-dependencies)
-           '()
-           `((propagated-inputs
-              (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
-                           direct-dependencies)))))
+     ,@(let ((direct-dependencies
+              (filter julia-dependency-direct? dependencies)))
+         (if (null? direct-dependencies)
+             '()
+             `((propagated-inputs
+                (list ,@(map (compose julia-name->guix-name juliahub-dependency-name)
+                             direct-dependencies))))))
      ,@(if (null? test-dependencies-names)
            '()
            `((native-inputs
-- 
2.38.1





bug closed, send any further explanations to 66076 <at> debbugs.gnu.org and Simon Tournier <zimon.toutoune <at> gmail.com> Request was from Simon Tournier <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 18 Sep 2023 21:01:11 GMT) Full text and rfc822 format available.

Merged 66075 66076. Request was from Simon Tournier <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 18 Sep 2023 21:01:12 GMT) Full text and rfc822 format available.

Merged 66075 66076 66077. Request was from Simon Tournier <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 18 Sep 2023 21:01:13 GMT) Full text and rfc822 format available.

Merged 66075 66076 66077 66078. Request was from Simon Tournier <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 18 Sep 2023 21:01:13 GMT) Full text and rfc822 format available.

Merged 66075 66076 66077 66078 66079. Request was from Simon Tournier <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 18 Sep 2023 21:01:14 GMT) Full text and rfc822 format available.

Merged 66075 66076 66077 66078 66079 66080. Request was from Simon Tournier <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 18 Sep 2023 21:01:15 GMT) Full text and rfc822 format available.

Merged 66075 66076 66077 66078 66079 66080 66081. Request was from Simon Tournier <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 18 Sep 2023 21:01:16 GMT) Full text and rfc822 format available.

Merged 66075 66076 66077 66078 66079 66080 66081 66082 66083 66084 66085 66086 66087 66088 66089. Request was from Simon Tournier <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 18 Sep 2023 21:01:17 GMT) Full text and rfc822 format available.

Merged 66075 66076 66077 66078 66079 66080 66081 66082 66083 66084 66085 66086 66087 66088 66089 66090 66091 66092. Request was from Simon Tournier <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 18 Sep 2023 21:01:18 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 17 Oct 2023 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 206 days ago.

Previous Next


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