From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:41418) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPCKh-0005if-5A for guix-patches@gnu.org; Thu, 16 Apr 2020 17:46:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPCKg-0002vI-AR for guix-patches@gnu.org; Thu, 16 Apr 2020 17:46:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56189) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jPCKg-0002vB-6t for guix-patches@gnu.org; Thu, 16 Apr 2020 17:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jPCKf-0001iV-Tr for guix-patches@gnu.org; Thu, 16 Apr 2020 17:46:01 -0400 Subject: [bug#40629] [PATCH 4/5] scripts/build: options->things-to-build: Handle .json files. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200414171959.3428-1-rekado@elephly.net> <20200414171959.3428-4-rekado@elephly.net> Date: Thu, 16 Apr 2020 23:45:39 +0200 In-Reply-To: <20200414171959.3428-4-rekado@elephly.net> (Ricardo Wurmus's message of "Tue, 14 Apr 2020 19:19:58 +0200") Message-ID: <87y2qvdrzw.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ricardo Wurmus Cc: 40629@debbugs.gnu.org Hello! Ricardo Wurmus skribis: > + (let ((file (or (and (string-suffix? ".json" file) > + (json->scheme-file file)) > + file))) > + (ensure-list (load* file (make-user-module '()))))) It would be nice if we could avoid writing to a file and then reading it back, perhaps by having a variant of =E2=80=98load*=E2=80=99 that takes an = sexp instead of a file name. (That could also allow us to improve error reporting because we could attach source properties to the sexp that match the original JSON file.) Ludo=E2=80=99.