From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:40472) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0lpx-0004fl-Vc for guix-patches@gnu.org; Thu, 22 Aug 2019 08:05:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0lpu-0007ey-NZ for guix-patches@gnu.org; Thu, 22 Aug 2019 08:05:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56468) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i0lpu-0007em-Hi for guix-patches@gnu.org; Thu, 22 Aug 2019 08:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i0lpu-0000cf-B4 for guix-patches@gnu.org; Thu, 22 Aug 2019 08:05:02 -0400 Subject: [bug#36948] [PATCH 1/2] import: utils: Add hash-ref*. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Christopher Baines Cc: 36948@debbugs.gnu.org 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.