From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 15:07:34 2019 Received: (at submit) by debbugs.gnu.org; 6 Aug 2019 19:07:34 +0000 Received: from localhost ([127.0.0.1]:37775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv4o1-0001D4-R8 for submit@debbugs.gnu.org; Tue, 06 Aug 2019 15:07:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:50680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv4o0-0001Cw-4X for submit@debbugs.gnu.org; Tue, 06 Aug 2019 15:07:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42871) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hv4nz-0007jE-8c for guix-patches@gnu.org; Tue, 06 Aug 2019 15:07:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hv4ny-0005fo-Dl for guix-patches@gnu.org; Tue, 06 Aug 2019 15:07:31 -0400 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:49914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hv4ny-0005fB-8A for guix-patches@gnu.org; Tue, 06 Aug 2019 15:07:30 -0400 Received: from localhost (220.185.93.209.dyn.plus.net [209.93.185.220]) by mira.cbaines.net (Postfix) with ESMTPSA id 4F0B017008 for ; Tue, 6 Aug 2019 20:07:28 +0100 (BST) Received: from phact (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 57b41732 for ; Tue, 6 Aug 2019 19:07:28 +0000 (UTC) User-agent: mu4e 1.2.0; emacs 26.2 From: Christopher Baines To: guix-patches@gnu.org Subject: [PATCH 0/2] Fix the CPAN importer Date: Tue, 06 Aug 2019 20:07:27 +0100 Message-ID: <87k1bq864w.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:7e00::f03c:91ff:fe69:8da9 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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: -2.3 (--) --=-=-= Content-Type: text/plain Christopher Baines (2): import: utils: Add hash-ref*. import: cpan: Adapt for the change to guile-json version 3. guix/import/cpan.scm | 30 ++++++++++++++++-------------- guix/import/utils.scm | 10 ++++++++++ tests/cpan.scm | 13 ++++++++----- 3 files changed, 34 insertions(+), 19 deletions(-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl1Jz+9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xey4xAAi3zgdTxzfHC63C+/UCKocaIN/HAYjZ8JLraeXurr+HhCPp1OAMK3h/T5 9tYtypgTWXetSG14XD3UcK75Bpbvc4A3lHRpO4nq8LAIsMsWPjmuj1eq36dXnOmO nQfapj0VTzV/V7Crw0z6fLqwOzJJ3Xa7S5UCBEPTYGV/ZvpWBKlVMPrBFK0S5hwg T/7aW8Ntmeikv4Am/CLm9FLKhXNBQ1fIctVmUXoAApLgFRMamjZudaoiqps83Wt9 KYDkvHBxS+TCP9RZbgACPoQghrfXIbsxs+3hN030VeF6Lc8Ts7D/2F2SKKt0+zTv nWpDdtYcpBna08QQJiNXLlbXp4mb39uI5X242vpTBAl+Dtx5nJk9bHp/Or2b2DgW yXQuXHKwql5slNz78e0C+YtTYUVWHRo3miwUZBxwogMdJ0vW+/12p28xsVz66cf6 v+z7ZFJGjdDsVcQYf8TfA+SDyAlxgElfsOgwsD26WtsZdTj3ZqKsy9Mr5CFzZVBw UBlr0FaVAmkfiKANeM66Xuw+95Bdnqhbm1byL4RZG9mTQNaLxBTev7dPbFqO5qkQ vw+MRUd5vXURqiu6F7b6DMvFhe6+HCrJkcONPdXLo1pGBU4PjxdAUhXlr2DkUrm+ KOnVjCQgzkfjLXkEFqAFwcR68knlEJuCXivDd3Wl0A6Y4Jsvfo8= =Iwo+ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 15:17:31 2019 Received: (at 36948) by debbugs.gnu.org; 6 Aug 2019 19:17:32 +0000 Received: from localhost ([127.0.0.1]:37791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv4xf-0003cn-HW for submit@debbugs.gnu.org; Tue, 06 Aug 2019 15:17:31 -0400 Received: from mira.cbaines.net ([212.71.252.8]:33934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv4xd-0003a6-OF for 36948@debbugs.gnu.org; Tue, 06 Aug 2019 15:17:30 -0400 Received: from localhost (220.185.93.209.dyn.plus.net [209.93.185.220]) by mira.cbaines.net (Postfix) with ESMTPSA id E556F1725C for <36948@debbugs.gnu.org>; Tue, 6 Aug 2019 20:17:28 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 836ae732 for <36948@debbugs.gnu.org>; Tue, 6 Aug 2019 19:17:28 +0000 (UTC) From: Christopher Baines To: 36948@debbugs.gnu.org Subject: [PATCH 1/2] import: utils: Add hash-ref*. Date: Tue, 6 Aug 2019 20:17:27 +0100 Message-Id: <20190806191728.22923-1-mail@cbaines.net> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 36948 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: -1.0 (-) With the change to guile-json version 3, JSON objects are represented as hash tables, rather than alists. The cpan importer uses assoc-ref* on a hash table, so add an equivalent function for hash tables. * guix/import/utils.scm (hash-ref*): New procedure. --- guix/import/utils.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index 2a3b7341fb..ed6c3ce6af 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -47,6 +47,7 @@ flatten assoc-ref* + hash-ref* url-fetch guix-hash-url @@ -116,6 +117,15 @@ recursively apply the procedure to the sub-list." (assoc-ref alist key) (apply assoc-ref* (assoc-ref alist key) rest))) +(define (hash-ref* hash-table key . rest) + "Return the value for KEY from HASH-TABLE. For each additional key specified, +recursively apply the procedure to the sub-hash-table." + (if (hash-table? hash-table) + (if (null? rest) + (hash-ref hash-table key) + (apply hash-ref* (hash-ref hash-table key) rest)) + #f)) ; For consistency with assoc-ref* + (define (url-fetch url file-name) "Save the contents of URL to FILE-NAME. Return #f on failure." (parameterize ((current-output-port (current-error-port))) -- 2.22.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 15:17:32 2019 Received: (at 36948) by debbugs.gnu.org; 6 Aug 2019 19:17:32 +0000 Received: from localhost ([127.0.0.1]:37793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv4xf-0003cq-Qg for submit@debbugs.gnu.org; Tue, 06 Aug 2019 15:17:32 -0400 Received: from mira.cbaines.net ([212.71.252.8]:33936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv4xd-0003a5-OE for 36948@debbugs.gnu.org; Tue, 06 Aug 2019 15:17:30 -0400 Received: from localhost (220.185.93.209.dyn.plus.net [209.93.185.220]) by mira.cbaines.net (Postfix) with ESMTPSA id 0109217261 for <36948@debbugs.gnu.org>; Tue, 6 Aug 2019 20:17:28 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id ab168cbf for <36948@debbugs.gnu.org>; Tue, 6 Aug 2019 19:17:28 +0000 (UTC) From: Christopher Baines To: 36948@debbugs.gnu.org Subject: [PATCH 2/2] import: cpan: Adapt for the change to guile-json version 3. Date: Tue, 6 Aug 2019 20:17:28 +0100 Message-Id: <20190806191728.22923-2-mail@cbaines.net> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190806191728.22923-1-mail@cbaines.net> References: <20190806191728.22923-1-mail@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36948 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: -1.0 (-) In guile-json version 3, JSON objects are represented as hash tables, rather than alists. * guix/import/cpan.scm (string->license): Change the match expression to match on lists, rather than vectors. (module->dist-name, cpan-source-url, cpan-version): Change assoc-ref to hash-ref. (cpan-module->sexp): Change assoc-ref to hash-ref, and assoc-ref* to hash-ref*. * tests/cpan.scm ("source-url-http", "source-url-https"): Convert the alist to a hash table. --- guix/import/cpan.scm | 30 ++++++++++++++++-------------- tests/cpan.scm | 13 ++++++++----- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm index ec86f11743..0be37e715e 100644 --- a/guix/import/cpan.scm +++ b/guix/import/cpan.scm @@ -34,7 +34,7 @@ #:use-module (guix ui) #:use-module ((guix download) #:select (download-to-store url-fetch)) #:use-module ((guix import utils) #:select (factorize-uri - flatten assoc-ref*)) + flatten hash-ref*)) #:use-module (guix import json) #:use-module (guix packages) #:use-module (guix upstream) @@ -76,8 +76,8 @@ ;; ssleay ;; sun ("zlib" 'zlib) - (#(x) (string->license x)) - (#(lst ...) `(list ,@(map string->license lst))) + ((x) (string->license x)) + ((lst ...) `(list ,@(map string->license lst))) (_ #f))) (define (module->name module) @@ -88,11 +88,11 @@ "Return the base distribution module for a given module. E.g. the 'ok' module is distributed with 'Test::Simple', so (module->dist-name \"ok\") would return \"Test-Simple\"" - (assoc-ref (json-fetch (string-append - "https://fastapi.metacpan.org/v1/module/" - module - "?fields=distribution")) - "distribution")) + (hash-ref (json-fetch (string-append + "https://fastapi.metacpan.org/v1/module/" + module + "?fields=distribution")) + "distribution")) (define (package->upstream-name package) "Return the CPAN name of PACKAGE." @@ -122,12 +122,12 @@ or #f on failure. MODULE should be e.g. \"Test::Script\"" (define (cpan-source-url meta) "Return the download URL for a module's source tarball." (regexp-substitute/global #f "http[s]?://cpan.metacpan.org" - (assoc-ref meta "download_url") + (hash-ref meta "download_url") 'pre "mirror://cpan" 'post)) (define (cpan-version meta) "Return the version number from META." - (match (assoc-ref meta "version") + (match (hash-ref meta "version") ((? number? version) ;; version is sometimes not quoted in the module json, so it gets ;; imported into Guile as a number, so convert it to a string. @@ -183,7 +183,7 @@ depend on (gnu packages perl)." "Return the `package' s-expression for a CPAN module from the metadata in META." (define name - (assoc-ref meta "distribution")) + (hash-ref meta "distribution")) (define (guix-name name) (if (string-prefix? "perl-" name) @@ -198,7 +198,9 @@ META." (match (flatten (map (lambda (ph) (filter-map (lambda (t) - (assoc-ref* meta "metadata" "prereqs" ph t)) + (and=> (hash-ref* meta "metadata" "prereqs" ph t) + (lambda (h) + (hash-map->list cons h)))) '("requires" "recommends" "suggests"))) phases)) (#f @@ -251,9 +253,9 @@ META." ,@(maybe-inputs 'propagated-inputs (convert-inputs '("runtime"))) (home-page ,(cpan-home name)) - (synopsis ,(assoc-ref meta "abstract")) + (synopsis ,(hash-ref meta "abstract")) (description fill-in-yourself!) - (license ,(string->license (assoc-ref meta "license")))))) + (license ,(string->license (hash-ref meta "license")))))) (define (cpan->guix-package module-name) "Fetch the metadata for PACKAGE-NAME from metacpan.org, and return the diff --git a/tests/cpan.scm b/tests/cpan.scm index 189dd027e6..cdd6c0e76a 100644 --- a/tests/cpan.scm +++ b/tests/cpan.scm @@ -24,7 +24,8 @@ #:use-module (guix tests) #:use-module (guix grafts) #:use-module (srfi srfi-64) - #:use-module (ice-9 match)) + #:use-module (ice-9 match) + #:use-module (ice-9 hash-table)) ;; Globally disable grafts because they can trigger early builds. (%graft? #f) @@ -109,14 +110,16 @@ (test-equal "source-url-http" ((@@ (guix import cpan) cpan-source-url) - `(("download_url" . - "http://cpan.metacpan.org/authors/id/T/TE/TEST/Foo-Bar-0.1.tar.gz"))) + (alist->hash-table + `(("download_url" . + "http://cpan.metacpan.org/authors/id/T/TE/TEST/Foo-Bar-0.1.tar.gz")))) "mirror://cpan/authors/id/T/TE/TEST/Foo-Bar-0.1.tar.gz") (test-equal "source-url-https" ((@@ (guix import cpan) cpan-source-url) - `(("download_url" . - "https://cpan.metacpan.org/authors/id/T/TE/TEST/Foo-Bar-0.1.tar.gz"))) + (alist->hash-table + `(("download_url" . + "https://cpan.metacpan.org/authors/id/T/TE/TEST/Foo-Bar-0.1.tar.gz")))) "mirror://cpan/authors/id/T/TE/TEST/Foo-Bar-0.1.tar.gz") (test-end "cpan") -- 2.22.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 21 13:30:47 2019 Received: (at 36948-done) by debbugs.gnu.org; 21 Aug 2019 17:30:47 +0000 Received: from localhost ([127.0.0.1]:36439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0URb-0003G0-GL for submit@debbugs.gnu.org; Wed, 21 Aug 2019 13:30:47 -0400 Received: from mira.cbaines.net ([212.71.252.8]:42758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0URY-0003Fr-Ez for 36948-done@debbugs.gnu.org; Wed, 21 Aug 2019 13:30:46 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 732F21724B for <36948-done@debbugs.gnu.org>; Wed, 21 Aug 2019 18:30:43 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id db0b46f5 for <36948-done@debbugs.gnu.org>; Wed, 21 Aug 2019 17:30:43 +0000 (UTC) References: <87k1bq864w.fsf@cbaines.net> User-agent: mu4e 1.2.0; emacs 26.2 From: Christopher Baines To: 36948-done@debbugs.gnu.org Subject: Re: [bug#36948] [PATCH 0/2] Fix the CPAN importer In-reply-to: <87k1bq864w.fsf@cbaines.net> Date: Wed, 21 Aug 2019 18:30:42 +0100 Message-ID: <875zmq8lz1.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 36948-done 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: -1.0 (-) --=-=-= Content-Type: text/plain Christopher Baines writes: > Christopher Baines (2): > import: utils: Add hash-ref*. > import: cpan: Adapt for the change to guile-json version 3. > > guix/import/cpan.scm | 30 ++++++++++++++++-------------- > guix/import/utils.scm | 10 ++++++++++ > tests/cpan.scm | 13 ++++++++----- > 3 files changed, 34 insertions(+), 19 deletions(-) I've pushed these patches as 01ce7af25add55514f737af48ea6c127bedfde67 now. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl1df8JfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xc7vRAAtV1Pil0G9JCqIYbdzcv2H4Q7DkhZyx4VO/nbY6pjWltY21IrLDEjYJi7 B9614FHoMIql2YCBn3NrgqvYN9VmZlGeIGooydJVhSqsNW83XU/w6xUuYQuXwed+ 9EkJQofp/MT9DCPblUC4Y4BLV1mNIkjPgvRoTnNXLNnZOkveOoARL6Go9vxVw/Hk xxHm7x2mvby5suZdvq2eX8Bdv0BKNe+7NHAGOPeL1AlkiJSis9gVMmAOEcmV9cwe g+sI4NYnWhGW26LYCFkA05f8wlQt3H2z1N7126/Njcy4GFPhlOz8mkXfJF/itiu8 NtRQvcmu5WllpKCYV4fITaPTIaxeuuoJe5nMqNrDk5Xpv0ZOJwJ/BdszsUIeTAi2 f4H2p0lyPc7/Mp79IbsV5xSVP6JR65/WLEUnNU5X0o2mEAmBIKyZ2/xcCryy0i2X ewf8gGkxvI44tR4VYtoAPOJx87fkV9f0jExt5ZucidkFxd+W/k8mOdr2GwReI/2I hWgYj1ZNj293Db4Y0ayDyffHryAxpZO4L4MhX49re1q/Vn9ei9qsC/xUTC5NWPsT tfffZJ7z61KicdB3s3T5hvBPGp0PN52fpfNij+rcbasRV6I3baqWfErjJBXl/p5H g/vbKQe+iTUmCexwTeY3PYENxlc3/jdCRv/awGxxPCAX0vnNGq0= =ThD/ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 22 08:04:41 2019 Received: (at 36948) by debbugs.gnu.org; 22 Aug 2019 12:04:41 +0000 Received: from localhost ([127.0.0.1]:37056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0lpY-0000c2-S7 for submit@debbugs.gnu.org; Thu, 22 Aug 2019 08:04:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0lpX-0000bp-8W for 36948@debbugs.gnu.org; Thu, 22 Aug 2019 08:04:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i0lpR-0007KH-JZ; Thu, 22 Aug 2019 08:04:33 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=52884 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i0lpP-00033e-P6; Thu, 22 Aug 2019 08:04:33 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Christopher Baines Subject: Re: [bug#36948] [PATCH 1/2] import: utils: Add hash-ref*. References: <87k1bq864w.fsf@cbaines.net> <20190806191728.22923-1-mail@cbaines.net> Date: Thu, 22 Aug 2019 14:04:28 +0200 In-Reply-To: <20190806191728.22923-1-mail@cbaines.net> (Christopher Baines's message of "Tue, 6 Aug 2019 20:17:27 +0100") Message-ID: <8736htqucz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36948 Cc: 36948@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: -3.3 (---) Hello Chris, Christopher Baines skribis: > With the change to guile-json version 3, JSON objects are represented as = hash > tables, rather than alists. The cpan importer uses assoc-ref* on a hash t= able, > so add an equivalent function for hash tables. > > * guix/import/utils.scm (hash-ref*): New procedure. [...] > In guile-json version 3, JSON objects are represented as hash tables, rat= her > than alists. I seems to me that this is adapting for Guile-JSON v1, not v3: in v3, JSON arrays map to Scheme vectors, and JSON dictionaries map to alists; JSON dictionaries used to map to hash tables in v1. Indeed, =E2=80=98tests/cpan.scm=E2=80=99 now fails for me: --8<---------------cut here---------------start------------->8--- actual-error: + (wrong-type-arg + "scm_hash_fn_get_handle" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 + "hash-table" + (("version" . "0.1") + ("author" . "Guix") + ("download_url" + . + "http://example.com/Foo-Bar-0.1.tar.gz") [=E2=80=A6] --8<---------------cut here---------------end--------------->8--- Could it be that you were testing this in an environment containing v1 and not v3? Sorry for not noticing earlier! Thanks, Ludo=E2=80=99. From unknown Wed Sep 10 09:37:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 20 Sep 2019 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator