unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Migrating to Guile-JSON 3.x
@ 2019-01-22 13:46 Ludovic Courtès
  2019-01-23 13:00 ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2019-01-22 13:46 UTC (permalink / raw)
  To: guix-devel

Hello Guix!

As you may know, Guile-JSON 3.x, released a couple of weeks ago, makes
significant incompatible API changes, the most important of which is
this:

--8<---------------cut here---------------start------------->8---
$ guix environment --ad-hoc guile guile-json@1 -- guile -c '(use-modules (json)) (pk (json-string->scm "{ \"a\": 1, \"b\": 2 }"))'

;;; (#<hash-table 10af420 2/31>)
$ guix environment --ad-hoc guile guile-json@3 -- guile -c '(use-modules (json)) (pk (json-string->scm "{ \"a\": 1, \"b\": 2 }"))'

;;; ((("b" . 2) ("a" . 1)))
--8<---------------cut here---------------end--------------->8---

In addition, JSON lists are now vectors in Scheme:

--8<---------------cut here---------------start------------->8---
$ guix environment --ad-hoc guile guile-json@1 -- guile -c '(use-modules (json)) (pk (json-string->scm "[ 1 2 3 ]"))'

;;; ((1 2 3))
$ guix environment --ad-hoc guile guile-json@3 -- guile -c '(use-modules (json)) (pk (json-string->scm "[ 1 2 3 ]"))'

;;; (#(1 2 3))
--8<---------------cut here---------------end--------------->8---

Conclusions:

  • Migration will be tricky since we’ll have to audit all our uses.
    Most of our code that uses JSON has unit tests but some of it
    doesn’t, in particular the web interface bindings in (guix ci) and
    (guix swh).

  • We won’t be able to support both 1.x and 3.x, so it’ll be a change
    with no return.

  • Things that depend on Guix (Cuirass, GWL, hpcguix-web, etc.) will
    have to switch at the same time.

Thoughts?  Volunteers?  :-)

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Migrating to Guile-JSON 3.x
  2019-01-22 13:46 Migrating to Guile-JSON 3.x Ludovic Courtès
@ 2019-01-23 13:00 ` Ricardo Wurmus
  2019-02-11 12:29   ` zimoun
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2019-01-23 13:00 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


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

>   • Migration will be tricky since we’ll have to audit all our uses.
>     Most of our code that uses JSON has unit tests but some of it
>     doesn’t, in particular the web interface bindings in (guix ci) and
>     (guix swh).

I hope this will result in more tests being written :)

>   • Things that depend on Guix (Cuirass, GWL, hpcguix-web, etc.) will
>     have to switch at the same time.

I can take care of hpcguix-web.  GWL doesn’t use Guile JSON.

--
Ricardo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Migrating to Guile-JSON 3.x
  2019-01-23 13:00 ` Ricardo Wurmus
@ 2019-02-11 12:29   ` zimoun
  0 siblings, 0 replies; 3+ messages in thread
From: zimoun @ 2019-02-11 12:29 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Guix Devel

Dear,

What is the status of this migration?

All the best,
simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-11 12:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-22 13:46 Migrating to Guile-JSON 3.x Ludovic Courtès
2019-01-23 13:00 ` Ricardo Wurmus
2019-02-11 12:29   ` zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).