From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Migrating to Guile-JSON 3.x Date: Tue, 22 Jan 2019 14:46:30 +0100 Message-ID: <87o988n6tl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:52243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gm1zW-00038z-2s for guix-devel@gnu.org; Tue, 22 Jan 2019 14:45:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gm1zV-0004So-4M for guix-devel@gnu.org; Tue, 22 Jan 2019 14:45:46 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:54970) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gm1zU-0004EF-On for guix-devel@gnu.org; Tue, 22 Jan 2019 14:45:44 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id C57D34AD6 for ; Tue, 22 Jan 2019 14:46:31 +0100 (CET) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TAjQ3HjNN-RF for ; Tue, 22 Jan 2019 14:46:31 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 10A4E4AD1 for ; Tue, 22 Jan 2019 14:46:30 +0100 (CET) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org 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 (j= son)) (pk (json-string->scm "{ \"a\": 1, \"b\": 2 }"))' ;;; (#) $ guix environment --ad-hoc guile guile-json@3 -- guile -c '(use-modules (j= son)) (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 (j= son)) (pk (json-string->scm "[ 1 2 3 ]"))' ;;; ((1 2 3)) $ guix environment --ad-hoc guile guile-json@3 -- guile -c '(use-modules (j= son)) (pk (json-string->scm "[ 1 2 3 ]"))' ;;; (#(1 2 3)) --8<---------------cut here---------------end--------------->8--- Conclusions: =E2=80=A2 Migration will be tricky since we=E2=80=99ll have to audit all = our uses. Most of our code that uses JSON has unit tests but some of it doesn=E2=80=99t, in particular the web interface bindings in (guix ci) = and (guix swh). =E2=80=A2 We won=E2=80=99t be able to support both 1.x and 3.x, so it=E2= =80=99ll be a change with no return. =E2=80=A2 Things that depend on Guix (Cuirass, GWL, hpcguix-web, etc.) wi= ll have to switch at the same time. Thoughts? Volunteers? :-) Thanks, Ludo=E2=80=99.