From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EE2HIP5r/F9EJgAA0tVLHw (envelope-from ) for ; Mon, 11 Jan 2021 15:17:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KINCHP5r/F8QbAAAbx9fmQ (envelope-from ) for ; Mon, 11 Jan 2021 15:17:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C9AD29404CA for ; Mon, 11 Jan 2021 15:17:17 +0000 (UTC) Received: from localhost ([::1]:50646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyywW-0007vc-7J for larch@yhetil.org; Mon, 11 Jan 2021 10:17:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyywI-0007uK-2K for bug-guix@gnu.org; Mon, 11 Jan 2021 10:17:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46269) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kyywH-0003mC-Qv for bug-guix@gnu.org; Mon, 11 Jan 2021 10:17:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kyywH-00075l-MN for bug-guix@gnu.org; Mon, 11 Jan 2021 10:17:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#45615: SWH API break? Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 11 Jan 2021 15:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45615 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: zimoun Received: via spool by 45615-submit@debbugs.gnu.org id=B45615.161037821627243 (code B ref 45615); Mon, 11 Jan 2021 15:17:01 +0000 Received: (at 45615) by debbugs.gnu.org; 11 Jan 2021 15:16:56 +0000 Received: from localhost ([127.0.0.1]:57815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyywB-00075L-S3 for submit@debbugs.gnu.org; Mon, 11 Jan 2021 10:16:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyyw8-000757-Ms for 45615@debbugs.gnu.org; Mon, 11 Jan 2021 10:16:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38213) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyyvz-0003l6-Uv; Mon, 11 Jan 2021 10:16:46 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=58432 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kyyvy-0003Ne-JS; Mon, 11 Jan 2021 10:16:43 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <18602984-9fa4-5d72-f17a-306c7336d5ea@crazy-compilers.com> <87a6tffwi9.fsf@gnu.org> <86lfczsfa4.fsf@gmail.com> Date: Mon, 11 Jan 2021 16:16:41 +0100 In-Reply-To: <86lfczsfa4.fsf@gmail.com> (zimoun's message of "Mon, 11 Jan 2021 15:45:55 +0100") Message-ID: <87y2gzcxly.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45615@debbugs.gnu.org, Hartmut Goebel Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.85 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: C9AD29404CA X-Spam-Score: -1.85 X-Migadu-Scanner: scn1.migadu.com X-TUID: ur0f2PnQ8uG+ Hi, zimoun skribis: > Well, maybe I miss something. The JSON looks like: > > https://archive.softwareheritage.org/api/1/origin/https://github.com/Geni= via/ugrep/get/ > > as we already discussed [1] the other day. From my understanding, when > the field does not exist, before guile-json sets to #f and now it sets > to #; I guess that it is related to the NEWS entry: > > - Record-JSON mapping now allows using *unspecified* values to indicate= a > field record should not be serialized. > (Fixes #61) > > > and the behaviour change is described here: > > Unspecified fields will now have the value *unspecified*. You mention > that json->link-record would assign a #f but that's not actually > correct, since a field could be a boolean in which case there would not > be a way to identify it.=20 > > > > > I am not familiar enough with Guile-JSON to see how to fix. Any tips? Thanks for investigating! Looking more closely, I think the issue is related to this change, but to me it=E2=80=99s a bug: it=E2=80=99s now impo= ssible to set a field to #f. Reported at . Unfortunately, I can=E2=80=99t think of a way to work around it since it=E2= =80=99s pretty fundamental. At any rate, we should add a test that exercises this in =E2=80=98tests/swh= .scm=E2=80=99 so we don=E2=80=99t get caught by surprise next time. Thanks, Ludo=E2=80=99.