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’.