guix-devel/guix/scripts
Ludovic Courtès 81c3dc3224
maint: Switch to Guile-JSON 3.x.
Guile-JSON 3.x is incompatible with Guile-JSON 1.x, which we relied on
until now: it maps JSON dictionaries to alists (instead of hash tables),
and JSON arrays to vectors (instead of lists).  This commit is about
adjusting all the existing code to this new mapping.

* m4/guix.m4 (GUIX_CHECK_GUILE_JSON): New macro.
* configure.ac: Use it.
* doc/guix.texi (Requirements): Mention the Guile-JSON version.
* guix/git-download.scm (git-fetch)[guile-json]: Use GUILE-JSON-3.
* guix/import/cpan.scm (string->license): Expect vectors instead of
lists.
(module->dist-name): Use 'json-fetch' instead of 'json-fetch-alist'.
(cpan-fetch): Likewise.
* guix/import/crate.scm (crate-fetch): Likewise, and call 'vector->list'
for DEPS.
* guix/import/gem.scm (rubygems-fetch): Likewise.
* guix/import/json.scm (json-fetch-alist): Remove.
* guix/import/pypi.scm (pypi-fetch): Use 'json-fetch' instead of
'json-fetch-alist'.
(latest-source-release, latest-wheel-release): Call 'vector->list' on
RELEASES.
* guix/import/stackage.scm (stackage-lts-info-fetch): Use 'json-fetch'
instead of 'json-fetch-alist'.
(lts-package-version): Use 'vector->list'.
* guix/import/utils.scm (hash-table->alist): Remove.
(alist->package): Pass 'vector->list' on the inputs fields, and default
to the empty vector.
* guix/scripts/import/json.scm (guix-import-json): Remove call to
'hash-table->alist'.
* guix/swh.scm (define-json-reader): Expect pair? or null? instead of
hash-table?.
[extract-field]: Use 'assoc-ref' instead of 'hash-ref'.
(json->branches): Use 'map' instead of 'hash-map->list'.
(json->checksums): Likewise.
(json->directory-entries, origin-visits): Call 'vector->list' on the
result of 'json->scm'.
* tests/import-utils.scm ("alist->package with dependencies"): New test.
* gnu/installer.scm (build-compiled-file)[builder]: Use GUILE-JSON-3.
* gnu/installer.scm (installer-program)[installer-builder]: Likewise.
* gnu/installer/locale.scm (iso639->iso639-languages): Use 'assoc-ref'
instead of 'hash-ref', and pass vectors through 'vector->list'.
(iso3166->iso3166-territories): Likewise.
* gnu/system/vm.scm (system-docker-image)[build]: Use GUILE-JSON-3.
* guix/docker.scm (manifest, config): Adjust for Guile-JSON 3.
* guix/scripts/pack.scm (docker-image)[build]: Use GUILE-JSON-3.
* guix/import/github.scm (fetch-releases-or-tags): Update docstring.
(latest-released-version): Use 'assoc-ref' instead of 'hash-ref'.  Pass
the result of 'fetch-releases-or-tags' to 'vector->list'.
* guix/import/launchpad.scm (latest-released-version): Likewise.
2019-07-25 00:16:41 +02:00
..
container
import maint: Switch to Guile-JSON 3.x. 2019-07-25 00:16:41 +02:00
system ui: Add 'display-search-results' and use it. 2019-06-27 11:14:41 +02:00
archive.scm guix archive: Use (gcrypt common). 2019-07-19 11:53:47 +02:00
authenticate.scm
build.scm guix build: '--log-file' no longer returns several log files. 2019-06-23 19:53:03 +02:00
challenge.scm substitute: Select the best compression methods. 2019-06-02 22:01:57 +02:00
container.scm
copy.scm Avoid name clash with 'build' from (guix store) and (guix status). 2019-02-11 23:23:28 +01:00
deploy.scm deploy: Handle the '--system' command line option. 2019-07-24 20:34:01 +08:00
describe.scm describe: Provide a hint when origin detection fails. 2019-04-28 22:57:06 +02:00
download.scm
edit.scm
environment.scm scripts: environment: Add --no-cwd. 2019-07-08 10:33:20 -04:00
gc.scm guix gc: Correctly handle '--delete-generations' with no arguments. 2019-07-11 23:13:26 +02:00
graph.scm graph: Use 'derivation-input-derivation'. 2019-06-27 11:14:41 +02:00
hash.scm
import.scm
install.scm guix package: Add 'install', 'remove', and 'upgrade' aliases. 2019-04-29 10:13:44 +02:00
lint.scm lint: Use the 'warning' procedure for messages. 2019-07-20 01:32:18 +02:00
offload.scm syscalls: Add 'with-file-lock' macro. 2019-06-05 23:10:36 +02:00
pack.scm maint: Switch to Guile-JSON 3.x. 2019-07-25 00:16:41 +02:00
package.scm guix gc: Correctly handle '--delete-generations' with no arguments. 2019-07-11 23:13:26 +02:00
perform-download.scm
processes.scm processes: Gracefully handle daemons without clients. 2019-04-29 21:54:10 +02:00
publish.scm Use more guix.gnu.org. 2019-07-16 23:00:10 +02:00
pull.scm pull: Pass #:use-substitutes? to 'show-what-to-build'. 2019-07-18 00:44:23 +02:00
refresh.scm refresh: Update the source code URL. 2019-03-27 14:59:42 +01:00
remove.scm guix package: Add 'install', 'remove', and 'upgrade' aliases. 2019-04-29 10:13:44 +02:00
repl.scm Add (guix repl). 2019-07-04 18:05:02 +02:00
search.scm guix package: Add 'guix search' alias. 2019-04-29 12:19:24 +02:00
size.scm size: Optimize dependency size computation. 2019-04-07 11:36:00 +02:00
substitute.scm substitute: Select the best compression methods. 2019-06-02 22:01:57 +02:00
system.scm guix gc: Correctly handle '--delete-generations' with no arguments. 2019-07-11 23:13:26 +02:00
upgrade.scm guix package: Add 'install', 'remove', and 'upgrade' aliases. 2019-04-29 10:13:44 +02:00
weather.scm substitute: Select the best compression methods. 2019-06-02 22:01:57 +02:00