GNU bug report logs -
#36948
[PATCH 0/2] Fix the CPAN importer
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Tue, 6 Aug 2019 19:08:02 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello Chris,
Christopher Baines <mail <at> cbaines.net> 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 table,
> 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, rather
> 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, ‘tests/cpan.scm’ 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")
[…]
--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’.
This bug report was last modified 5 years and 357 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.