mbox series

[bug#36760,0/3] Switch to Guile-JSON 3.x

Message ID 20190722101337.11764-1-ludo@gnu.org
Headers show
Series Switch to Guile-JSON 3.x | expand

Message

Ludovic Courtès July 22, 2019, 10:13 a.m. UTC
Hello Guix!

This is the big switch to Guile-JSON 3.x!

As a reminder, Guile-JSON 3.x changes the mapping between JSON data
structures and Scheme data structures in an incompatible way compared
to 1.x.  Essentially, JSON dictionaries now map to alists (instead of
hash tables), and JSON arrays map to vectors (instead of lists.)

The patch updates all the code in one go, mostly because a single Guile
process cannot have two different (json) modules loaded at the same
time.

When we update the ‘guix’ package, everything that depends on it will
also have to be updated to a snapshot that uses Guile-JSON 3.x: cuirass,
hpcguix-web, and rcas-web.  I count on you, dear reader, to help in
those areas.  :-)

Comments?

Ludo’.

Ludovic Courtès (3):
  maint: Switch to Guile-JSON 3.x.
  gnu: guile-json: Define 'guile-json-1'.
  gnu: Explicitly refer to 'guile-json-1' when needed.

 configure.ac                        |  4 ++--
 doc/guix.texi                       |  2 +-
 gnu/installer.scm                   |  4 ++--
 gnu/installer/locale.scm            | 21 +++++++++--------
 gnu/packages/bioinformatics.scm     |  2 +-
 gnu/packages/ci.scm                 |  2 +-
 gnu/packages/guile-xyz.scm          |  6 ++---
 gnu/packages/guile.scm              |  4 ++++
 gnu/packages/mail.scm               |  4 ++--
 gnu/packages/package-management.scm |  4 ++--
 gnu/packages/web.scm                |  2 +-
 gnu/system/vm.scm                   |  2 +-
 guix/docker.scm                     | 19 ++++++++--------
 guix/git-download.scm               |  4 ++--
 guix/import/cpan.scm                | 14 ++++++------
 guix/import/crate.scm               |  6 ++---
 guix/import/gem.scm                 | 10 ++++++---
 guix/import/json.scm                | 11 ++-------
 guix/import/pypi.scm                |  8 +++----
 guix/import/stackage.scm            |  4 ++--
 guix/import/utils.scm               | 25 +++++----------------
 guix/scripts/import/json.scm        |  2 +-
 guix/scripts/pack.scm               |  2 +-
 guix/self.scm                       |  2 +-
 guix/swh.scm                        | 35 ++++++++++++++++-------------
 m4/guix.m4                          | 21 +++++++++++++++++
 tests/import-utils.scm              | 22 ++++++++++++++++++
 27 files changed, 140 insertions(+), 102 deletions(-)

Comments

Ludovic Courtès July 24, 2019, 10:39 p.m. UTC | #1
Hello!

Ludovic Courtès <ludo@gnu.org> skribis:

>   maint: Switch to Guile-JSON 3.x.
>   gnu: guile-json: Define 'guile-json-1'.
>   gnu: Explicitly refer to 'guile-json-1' when needed.

Pushed!

  91f55717ab gnu: Explicitly refer to 'guile-json-1' when needed.
  584a3ca3a4 gnu: guile-json: Define 'guile-json-1'.
  81c3dc3224 maint: Switch to Guile-JSON 3.x.

Compared to what I sent, I updated the ‘github’ and ‘launchpad’
updaters, which I had forgotten.

Now we need to adjust cuirass, hpcguix-web, and rcas-web.  I’m taking a
look at hpcguix-web.

Ludo’.
Ludovic Courtès Aug. 17, 2019, 5:29 p.m. UTC | #2
Hello,

Ludovic Courtès <ludo@gnu.org> skribis:

> When we update the ‘guix’ package, everything that depends on it will
> also have to be updated to a snapshot that uses Guile-JSON 3.x: cuirass,
> hpcguix-web, and rcas-web.  I count on you, dear reader, to help in
> those areas.  :-)

Commit 2eb0628a423a36bc21777d7439885baa9a9a8e6d updates the ‘guix’ and
‘cuirass’ packages to use Guile-JSON 3.x.  ‘hpcguix-web’ was updated
earlier, in commit 4b0356590a57bc27a61956b981f4a90efcf9c92d.

I haven’t checked rcas-web though; Ricardo?

Ludo’.
Ricardo Wurmus Aug. 17, 2019, 8:47 p.m. UTC | #3
Ludovic Courtès <ludo@gnu.org> writes:

> Hello,
>
> Ludovic Courtès <ludo@gnu.org> skribis:
>
>> When we update the ‘guix’ package, everything that depends on it will
>> also have to be updated to a snapshot that uses Guile-JSON 3.x: cuirass,
>> hpcguix-web, and rcas-web.  I count on you, dear reader, to help in
>> those areas.  :-)
>
> Commit 2eb0628a423a36bc21777d7439885baa9a9a8e6d updates the ‘guix’ and
> ‘cuirass’ packages to use Guile-JSON 3.x.  ‘hpcguix-web’ was updated
> earlier, in commit 4b0356590a57bc27a61956b981f4a90efcf9c92d.

Thank you!

> I haven’t checked rcas-web though; Ricardo?

rcas-web doesn’t talk to Guix, so its use of an older Guile JSON is not
a problem.  If we want to let “guile-json” point to 3.x that’s fine;
we’d just let rcas-web use the 1.x variant.

(I’ll update it at some point in the future, but it doesn’t seem
critical.)

--
Ricardo
Ludovic Courtès Aug. 17, 2019, 9:17 p.m. UTC | #4
Hello,

Ricardo Wurmus <rekado@elephly.net> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:

[...]

>> Commit 2eb0628a423a36bc21777d7439885baa9a9a8e6d updates the ‘guix’ and
>> ‘cuirass’ packages to use Guile-JSON 3.x.  ‘hpcguix-web’ was updated
>> earlier, in commit 4b0356590a57bc27a61956b981f4a90efcf9c92d.
>
> Thank you!
>
>> I haven’t checked rcas-web though; Ricardo?
>
> rcas-web doesn’t talk to Guix, so its use of an older Guile JSON is not
> a problem.  If we want to let “guile-json” point to 3.x that’s fine;
> we’d just let rcas-web use the 1.x variant.

Perfect, in that case we’re all set.  Thanks!

Ludo’.