mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 13:09:23 -05:00
import, swh: Adjust to Guile-JSON 4.5.x unspecified value handling.
* guix/import/cpan.scm (<cpan-release>)[home-page]: Add 'unspecified?' case. * guix/import/gem.scm (<gem>)[licenses]: Likewise. (json->gem-dependency-list): Likewise. * guix/swh.scm (<directory-entry>)[checksums]: Likewise.
This commit is contained in:
parent
41134f915f
commit
3d43b7aef3
3 changed files with 7 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
||||||
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
|
;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
|
||||||
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -109,6 +109,7 @@ (module cpan-release-module "main_module") ;e.g., "Test::Script"
|
||||||
(home-page cpan-release-home-page "resources"
|
(home-page cpan-release-home-page "resources"
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(#f #f)
|
(#f #f)
|
||||||
|
((? unspecified?) #f)
|
||||||
((lst ...) (assoc-ref lst "homepage"))))
|
((lst ...) (assoc-ref lst "homepage"))))
|
||||||
(dependencies cpan-release-dependencies "dependency"
|
(dependencies cpan-release-dependencies "dependency"
|
||||||
(lambda (vector)
|
(lambda (vector)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
;;; Copyright © 2015 David Thompson <davet@gnu.org>
|
;;; Copyright © 2015 David Thompson <davet@gnu.org>
|
||||||
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
|
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
|
||||||
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
|
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
|
||||||
;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
|
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -49,6 +49,7 @@ (define-json-mapping <gem> make-gem gem?
|
||||||
;; This is sometimes #nil (the JSON 'null' value). Arrange
|
;; This is sometimes #nil (the JSON 'null' value). Arrange
|
||||||
;; to always return a list.
|
;; to always return a list.
|
||||||
(cond ((not licenses) '())
|
(cond ((not licenses) '())
|
||||||
|
((unspecified? licenses) '())
|
||||||
((vector? licenses) (vector->list licenses))
|
((vector? licenses) (vector->list licenses))
|
||||||
(else '()))))
|
(else '()))))
|
||||||
(info gem-info)
|
(info gem-info)
|
||||||
|
@ -69,7 +70,7 @@ (define-json-mapping <gem-dependencies> make-gem-dependencies
|
||||||
json->gem-dependency-list))
|
json->gem-dependency-list))
|
||||||
|
|
||||||
(define (json->gem-dependency-list vector)
|
(define (json->gem-dependency-list vector)
|
||||||
(if vector
|
(if (and vector (not (unspecified? vector)))
|
||||||
(map json->gem-dependency (vector->list vector))
|
(map json->gem-dependency (vector->list vector))
|
||||||
'()))
|
'()))
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
|
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -348,6 +348,7 @@ (define-json-mapping <directory-entry> make-directory-entry directory-entry?
|
||||||
(checksums directory-entry-checksums "checksums"
|
(checksums directory-entry-checksums "checksums"
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(#f #f)
|
(#f #f)
|
||||||
|
((? unspecified?) #f)
|
||||||
(lst (json->checksums lst))))
|
(lst (json->checksums lst))))
|
||||||
(id directory-entry-id "dir_id")
|
(id directory-entry-id "dir_id")
|
||||||
(length directory-entry-length)
|
(length directory-entry-length)
|
||||||
|
|
Loading…
Reference in a new issue