GNU bug report logs - #45615
Wrong type argument in "guix lint -c archival"

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Hartmut Goebel <h.goebel@HIDDEN>; dated Sat, 2 Jan 2021 22:15:01 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 45615 <at> debbugs.gnu.org:


Received: (at 45615) by debbugs.gnu.org; 14 Jan 2021 11:09:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 14 06:09:47 2021
Received: from localhost ([127.0.0.1]:37302 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l00Vf-0003un-8x
	for submit <at> debbugs.gnu.org; Thu, 14 Jan 2021 06:09:47 -0500
Received: from eggs.gnu.org ([209.51.188.92]:52312)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1l00Vc-0003uZ-QD
 for 45615 <at> debbugs.gnu.org; Thu, 14 Jan 2021 06:09:45 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:48602)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1l00VV-000792-Dd; Thu, 14 Jan 2021 06:09:38 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41742 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1l00VU-00008x-TW; Thu, 14 Jan 2021 06:09:37 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: bug#45615: SWH API break?
References: <18602984-9fa4-5d72-f17a-306c7336d5ea@HIDDEN>
 <CAJ3okZ1Js7xMVZJ+dQVdmRUKM34++_+3Tha8HPfg-S8ngtKU4g@HIDDEN>
 <87a6tffwi9.fsf@HIDDEN> <86lfczsfa4.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 25 =?utf-8?Q?Niv=C3=B4se?= an 229 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Thu, 14 Jan 2021 12:09:35 +0100
In-Reply-To: <86lfczsfa4.fsf@HIDDEN> (zimoun's message of "Mon, 11 Jan 2021
 15:45:55 +0100")
Message-ID: <87bldr7p1s.fsf@HIDDEN>
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-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45615
Cc: 45615 <at> debbugs.gnu.org, Hartmut Goebel <h.goebel@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi!

For the record, I reported the issue here:

  https://github.com/aconchillo/guile-json/issues/69

It was promptly fixed and released in 4.5.1, but at first sight this
version introduces other issues.  To be continued=E2=80=A6

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#45615; Package guix. Full text available.

Message received at 45615 <at> debbugs.gnu.org:


Received: (at 45615) by debbugs.gnu.org; 11 Jan 2021 15:16:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 11 10:16:56 2021
Received: from localhost ([127.0.0.1]:57815 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kyywB-00075L-S3
	for submit <at> 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 <ludo@HIDDEN>) id 1kyyw8-000757-Ms
 for 45615 <at> 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 <ludo@HIDDEN>)
 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 <ludo@HIDDEN>)
 id 1kyyvy-0003Ne-JS; Mon, 11 Jan 2021 10:16:43 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: bug#45615: SWH API break?
References: <18602984-9fa4-5d72-f17a-306c7336d5ea@HIDDEN>
 <CAJ3okZ1Js7xMVZJ+dQVdmRUKM34++_+3Tha8HPfg-S8ngtKU4g@HIDDEN>
 <87a6tffwi9.fsf@HIDDEN> <86lfczsfa4.fsf@HIDDEN>
Date: Mon, 11 Jan 2021 16:16:41 +0100
In-Reply-To: <86lfczsfa4.fsf@HIDDEN> (zimoun's message of "Mon, 11 Jan 2021
 15:45:55 +0100")
Message-ID: <87y2gzcxly.fsf@HIDDEN>
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-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45615
Cc: 45615 <at> debbugs.gnu.org, Hartmut Goebel <h.goebel@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

zimoun <zimon.toutoune@HIDDEN> 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 #<unspecified>; 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
>
> <https://github.com/aconchillo/guile-json/issues/61#issuecomment-70321259=
0>
>
>
> 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
<https://github.com/aconchillo/guile-json/issues/69>.

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.




Information forwarded to bug-guix@HIDDEN:
bug#45615; Package guix. Full text available.

Message received at 45615 <at> debbugs.gnu.org:


Received: (at 45615) by debbugs.gnu.org; 11 Jan 2021 14:53:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 11 09:53:56 2021
Received: from localhost ([127.0.0.1]:56295 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kyyZw-00041V-Kh
	for submit <at> debbugs.gnu.org; Mon, 11 Jan 2021 09:53:56 -0500
Received: from mail-wr1-f48.google.com ([209.85.221.48]:33508)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1kyyZv-00041F-73
 for 45615 <at> debbugs.gnu.org; Mon, 11 Jan 2021 09:53:55 -0500
Received: by mail-wr1-f48.google.com with SMTP id t30so102953wrb.0
 for <45615 <at> debbugs.gnu.org>; Mon, 11 Jan 2021 06:53:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:in-reply-to:references:date:message-id
 :mime-version:content-transfer-encoding;
 bh=nRuZZ/8s9L0m+TA1gQ9BJMuf3FMPVlXYzb87wq+Evew=;
 b=uJHFqR0UZkdI5UzO7eZp7CVqQP/6B3X5UTSSmGPruLcZ6iLmgZRpLtg4CiPaqvNcso
 L625cgX+gxiv8PhbV5wRey/2WnLKCfKtPER2qt2MKxJkmQI93QK/QmsXUA11u9sZoeuF
 +xoc795ezX/63y5QlnBe24Na+ekXfpTvGLsVCSNgCQ03OLedTYVRKQdJq78NAY19yZnD
 6RVc3U8e1u0l9uMmOB1PRupQOK8pDSQdPrBsHcHcAEQ/fIknpQiMeFZktbNErzkE0fnC
 VLQgI7bHiKkN+JuXkr4AwUxxoscMXkYmB+HslKZ44HB/ehnf+jR08mxA8inkmXcrY+Qv
 Jshw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date
 :message-id:mime-version:content-transfer-encoding;
 bh=nRuZZ/8s9L0m+TA1gQ9BJMuf3FMPVlXYzb87wq+Evew=;
 b=skiguXrPMlGJCu5sJGAntljDOpET/BH2Of6/OJEgL9v1ItJuD6+EYtSwOBKpJNqZOO
 WLWKimtLOwhJAoLC6i12kNLo1I4CiN+7vSFpwIFlt6iXvNF6Cu6iC3VVU5eL2vDGZjXo
 GT4UqfHnOzgIisUMqYYeFXWlEGHSkpFrrvezQ7IMFsoi9Motd1+Mxg6NKEkW7dk5wc/v
 1JEKq4S/DMgFUN+m9NJntyhglHR4LmybcVG504eDoLErY7LakSr+Ny5WkIfcg3PkeJMs
 isQGS6QwdP9FsgvZprF3XN0Juch9ROAvUdYoTe3m3oXM6GPF9V1u+JKIRId/3RmdHnbi
 A2jg==
X-Gm-Message-State: AOAM530IxDg/DRoleAfXnRD7w2wZSJmHXrCuSu/4cikmp6OC/GMa0+4E
 VGj9Y6jysIAVjVjnaWRjLVxHLfVQtVY=
X-Google-Smtp-Source: ABdhPJy0zbun9/qrRdWOQ6IVYXaRzMwe+sXptzjTfpHF6f9ipidTOcIDs5sT/CrmYlwsat7jywTh0w==
X-Received: by 2002:a5d:4ccf:: with SMTP id c15mr16762820wrt.237.1610376829160; 
 Mon, 11 Jan 2021 06:53:49 -0800 (PST)
Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e])
 by smtp.gmail.com with ESMTPSA id y6sm10985wmg.39.2021.01.11.06.53.48
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 11 Jan 2021 06:53:48 -0800 (PST)
From: zimoun <zimon.toutoune@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#45615: SWH API break?
In-Reply-To: <87a6tffwi9.fsf@HIDDEN>
References: <18602984-9fa4-5d72-f17a-306c7336d5ea@HIDDEN>
 <CAJ3okZ1Js7xMVZJ+dQVdmRUKM34++_+3Tha8HPfg-S8ngtKU4g@HIDDEN>
 <87a6tffwi9.fsf@HIDDEN>
Date: Mon, 11 Jan 2021 15:45:55 +0100
Message-ID: <86lfczsfa4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45615
Cc: 45615 <at> debbugs.gnu.org, Hartmut Goebel <h.goebel@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Ludo,

On Mon, 11 Jan 2021 at 14:12, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:

>>   (snapshot-url visit-snapshot-url "snapshot_url" string*) ;string | #f

[...]

>> and why it is not string or #f.
>
> As discussed on IRC the other day, the culprit seems to be the recent
> guile-json upgrade (from 4.3.2 to 4.4.1, commit
> f9e1baa8933ea2ed385d0272dbfbe4e22f192bde).
>
> Were you able to check the raw JSON and see where the value is getting
> lost?

Well, maybe I miss something.  The JSON looks like:

https://archive.softwareheritage.org/api/1/origin/https://github.com/Genivi=
a/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 #<unspecified>; I guess that it is related to the NEWS entry:

--8<---------------cut here---------------start------------->8---
  - Record-JSON mapping now allows using *unspecified* values to indicate a
    field record should not be serialized.
    (Fixes #61)
--8<---------------cut here---------------end--------------->8---

and the behaviour change is described here:

--8<---------------cut here---------------start------------->8---
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
--8<---------------cut here---------------end--------------->8---

<https://github.com/aconchillo/guile-json/issues/61#issuecomment-703212590>


I am not familiar enough with Guile-JSON to see how to fix.  Any tips?

Cheers,
simon

1: <http://logs.guix.gnu.org/guix/2021-01-07.log#180852>




Information forwarded to bug-guix@HIDDEN:
bug#45615; Package guix. Full text available.

Message received at 45615 <at> debbugs.gnu.org:


Received: (at 45615) by debbugs.gnu.org; 11 Jan 2021 13:12:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 11 08:12:24 2021
Received: from localhost ([127.0.0.1]:56064 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kywzg-0005Mz-Ax
	for submit <at> debbugs.gnu.org; Mon, 11 Jan 2021 08:12:24 -0500
Received: from eggs.gnu.org ([209.51.188.92]:52052)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kywze-0005Mj-DS
 for 45615 <at> debbugs.gnu.org; Mon, 11 Jan 2021 08:12:23 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36456)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1kywzY-0003uF-Il; Mon, 11 Jan 2021 08:12:16 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57914 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1kywzX-0005Sd-I7; Mon, 11 Jan 2021 08:12:15 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: bug#45615: SWH API break?
References: <18602984-9fa4-5d72-f17a-306c7336d5ea@HIDDEN>
 <CAJ3okZ1Js7xMVZJ+dQVdmRUKM34++_+3Tha8HPfg-S8ngtKU4g@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 22 =?utf-8?Q?Niv=C3=B4se?= an 229 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Mon, 11 Jan 2021 14:12:14 +0100
In-Reply-To: <CAJ3okZ1Js7xMVZJ+dQVdmRUKM34++_+3Tha8HPfg-S8ngtKU4g@HIDDEN>
 (zimoun's message of "Thu, 7 Jan 2021 16:41:46 +0100")
Message-ID: <87a6tffwi9.fsf@HIDDEN>
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-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45615
Cc: 45615 <at> debbugs.gnu.org, Hartmut Goebel <h.goebel@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi!

zimoun <zimon.toutoune@HIDDEN> skribis:

> It comes from 'visit-snapshot-url' returning #<unspecified> instead of
> #f.  Then 'swh-url' fails because the 'path' argument is not a string.
>
> Well, I do not how to fix it.  I am confused by:
>
> ;; <https://archive.softwareheritage.org/api/1/origin/52181937/visits/>
> (define-json-mapping <visit> make-visit visit?
>   json->visit
>   (date visit-date "date" string->date*)
>   (origin visit-origin)
>   (url visit-url "origin_visit_url")
>   (snapshot-url visit-snapshot-url "snapshot_url" string*) ;string | #f
>   (status visit-status "status" string->symbol)   ;'full | 'partial | 'on=
going
>   (number visit-number "visit"))
>
> and why it is not string or #f.

As discussed on IRC the other day, the culprit seems to be the recent
guile-json upgrade (from 4.3.2 to 4.4.1, commit
f9e1baa8933ea2ed385d0272dbfbe4e22f192bde).

Were you able to check the raw JSON and see where the value is getting
lost?

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#45615; Package guix. Full text available.

Message received at 45615 <at> debbugs.gnu.org:


Received: (at 45615) by debbugs.gnu.org; 7 Jan 2021 15:42:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 07 10:42:05 2021
Received: from localhost ([127.0.0.1]:48351 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxXQL-0008Kl-Eu
	for submit <at> debbugs.gnu.org; Thu, 07 Jan 2021 10:42:05 -0500
Received: from mail-qk1-f179.google.com ([209.85.222.179]:39811)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1kxXQJ-0008KG-B5
 for 45615 <at> debbugs.gnu.org; Thu, 07 Jan 2021 10:42:03 -0500
Received: by mail-qk1-f179.google.com with SMTP id p14so5759410qke.6
 for <45615 <at> debbugs.gnu.org>; Thu, 07 Jan 2021 07:42:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=KoGwG5y+cuI3envRZPLz1msx51udpYAyXPxzKP5GIcI=;
 b=dJMfmv/BZ5XnfsTRlAnv6H70ICKXhYbRJEusqaXUMr08h7luccyVlra78hG++CTBmk
 NAtT1WqV6dYky5eOgpWDe+Tf+XGezDUpfl+epV9PzarJDoamWuEsZTkfqc6msFNDEuy5
 1zjtU2j3c71kvpjtQVUx81IKMPG2g/NFKXUkXp9tbgJBa+Axhsj9Zz1B0De+zyhoXqH+
 lE+kvgB4N8LlgA9LHY5qvGwVMHQGVFMskSRuMW8fXJN/xdCnuo3qT1fZoXWXyznOEf1Q
 oGBMD5tpK1TLCG8eZWzpsWyTsSpyO6ai9j+/RPUCE8hivHEu/7fJ0RWr7RHsikSPWCZI
 AikA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=KoGwG5y+cuI3envRZPLz1msx51udpYAyXPxzKP5GIcI=;
 b=WvYqTtnyRpAZd97Utv78+sjsgSF4eOfCPnBHJbZ2lIc6R7PUEAu+quFROzm21yb85y
 QNulgmFkNGU1ib3let8xiQ+zfE+29l8Fk0LBIrjM5i/utre8lXrvyjYMekO9KGNteyPe
 bq9EgeVSxu0MTHQ5iBtV4bbUwsqlj5AsqMmC43vdKA7IofY49gVVjsT5cht4/hScPwFB
 4sWR+eoy4gJzrtbLM158OWKiP4LidnY+uEVleGOwKKUNeb8rhqifGr7VGMI6BwuuTj/h
 AXMP+a1bQLWDlqZQfvy3sop643rR74H+AtfAJU3Tz6D13nWgxUWfNmpTFGNAKUrhPE7G
 X/sQ==
X-Gm-Message-State: AOAM530KxpJGxahhSVd6iDwIuzMcEfdXr8jSYUtmZUCw1Igwlg8TYYiT
 bx+P8IT4vrD2wqU5NsMQwPygPVqjfAFk9rPhFGk=
X-Google-Smtp-Source: ABdhPJzHMnBwIWxV8mUhkUhUwm2DnMMtls13gUTiQ5ZE0F+MT04ltSvF0fBO9VxuyNBiWAHKctQQKIPNpwv29jMCzOQ=
X-Received: by 2002:a05:620a:2105:: with SMTP id
 l5mr9762318qkl.126.1610034117753; 
 Thu, 07 Jan 2021 07:41:57 -0800 (PST)
MIME-Version: 1.0
References: <18602984-9fa4-5d72-f17a-306c7336d5ea@HIDDEN>
In-Reply-To: <18602984-9fa4-5d72-f17a-306c7336d5ea@HIDDEN>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Thu, 7 Jan 2021 16:41:46 +0100
Message-ID: <CAJ3okZ1Js7xMVZJ+dQVdmRUKM34++_+3Tha8HPfg-S8ngtKU4g@HIDDEN>
Subject: bug#45615: SWH API break?
To: Hartmut Goebel <h.goebel@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45615
Cc: 45615 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Thanks for the report.

It comes from 'visit-snapshot-url' returning #<unspecified> instead of
#f.  Then 'swh-url' fails because the 'path' argument is not a string.

Well, I do not how to fix it.  I am confused by:

--8<---------------cut here---------------start------------->8---
;; <https://archive.softwareheritage.org/api/1/origin/52181937/visits/>
(define-json-mapping <visit> make-visit visit?
  json->visit
  (date visit-date "date" string->date*)
  (origin visit-origin)
  (url visit-url "origin_visit_url")
  (snapshot-url visit-snapshot-url "snapshot_url" string*) ;string | #f
  (status visit-status "status" string->symbol)   ;'full | 'partial | 'ongoing
  (number visit-number "visit"))
--8<---------------cut here---------------end--------------->8---

and why it is not string or #f.

Ludo, any tips? :-)


All the best,
simon




Information forwarded to bug-guix@HIDDEN:
bug#45615; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 2 Jan 2021 22:14:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 02 17:14:13 2021
Received: from localhost ([127.0.0.1]:32836 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kvpA4-0004Bn-ON
	for submit <at> debbugs.gnu.org; Sat, 02 Jan 2021 17:14:13 -0500
Received: from lists.gnu.org ([209.51.188.17]:49654)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <h.goebel@HIDDEN>) id 1kvpA2-0004Bf-Cp
 for submit <at> debbugs.gnu.org; Sat, 02 Jan 2021 17:14:10 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:49992)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <h.goebel@HIDDEN>)
 id 1kvpA2-00045K-7A
 for bug-guix@HIDDEN; Sat, 02 Jan 2021 17:14:10 -0500
Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]:35467)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <h.goebel@HIDDEN>)
 id 1kvp9z-0002PU-DZ
 for bug-guix@HIDDEN; Sat, 02 Jan 2021 17:14:10 -0500
Received: from frontend01.mail.m-online.net (unknown [192.168.8.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 4D7blK4SCsz1rtZ9
 for <bug-guix@HIDDEN>; Sat,  2 Jan 2021 23:14:05 +0100 (CET)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.70])
 by mail.m-online.net (Postfix) with ESMTP id 4D7blK4GNCz1qs5b
 for <bug-guix@HIDDEN>; Sat,  2 Jan 2021 23:14:05 +0100 (CET)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.182])
 by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,
 port 10024) with ESMTP id qmKtoQ8HSKD9 for <bug-guix@HIDDEN>;
 Sat,  2 Jan 2021 23:14:04 +0100 (CET)
Received: from hermia.goebel-consult.de
 (ppp-188-174-51-199.dynamic.mnet-online.de [188.174.51.199])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.mnet-online.de (Postfix) with ESMTPS
 for <bug-guix@HIDDEN>; Sat,  2 Jan 2021 23:14:04 +0100 (CET)
Received: from thisbe.goebel-consult.de (hermia.goebel-consult.de
 [192.168.110.7])
 by hermia.goebel-consult.de (Postfix) with ESMTP id 476586023E
 for <bug-guix@HIDDEN>; Sat,  2 Jan 2021 23:19:11 +0100 (CET)
To: bug-guix <bug-guix@HIDDEN>
From: Hartmut Goebel <h.goebel@HIDDEN>
Subject: Wrong type argument in "guix lint -c archival"
Organization: crazy-compilers.com
Message-ID: <18602984-9fa4-5d72-f17a-306c7336d5ea@HIDDEN>
Date: Sat, 2 Jan 2021 23:14:01 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.12.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Received-SPF: none client-ip=2001:a60:0:28:0:1:25:1;
 envelope-from=h.goebel@HIDDEN; helo=mail-out.m-online.net
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

When running "guix lint -c archival ugrep" I get this backtrace show below.

Expected behavior: No crash, but a useful error message.

Reproduce:

* Guix 947aed127a48ef41bab3bdbb4252eb2a56dafc10 (2021-01-01 13:55:11)
* ugrep (new package) see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45614


$ ./pre-inst-env guix lint ugrep -c archival
…
Backtrace:grep@HIDDEN [archival]...
In ice-9/boot-9.scm:
  1736:10 15 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
          14 (apply-smob/0 #<thunk 7f1688172740>)
In ice-9/boot-9.scm:
    718:2 13 (call-with-prompt _ _ #<procedure default-prompt-handle?>)
In ice-9/eval.scm:
    619:8 12 (_ #(#(#<directory (guile-user) 7f1687daff00>)))
In guix/ui.scm:
  2127:12 11 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1736:10 10 (with-exception-handler _ _ #:unwind? _ # _)
  1731:15  9 (with-exception-handler #<procedure 7f1685072a20 at ic?> ?)
In srfi/srfi-1.scm:
    634:9  8 (for-each #<procedure 7f1685dc8880 at guix/scripts/lin?> ?)
In guix/scripts/lint.scm:
     65:4  7 (run-checkers #<package ugrep@HIDDEN /home/hartmut/deve?> ?)
In srfi/srfi-1.scm:
    634:9  6 (for-each #<procedure 7f16756f69f0 at guix/scripts/lin?> ?)
In guix/scripts/lint.scm:
    74:21  5 (_ _)
In guix/lint.scm:
   1225:4  4 (check-archival _)
   1092:2  3 (call-with-networking-fail-safe _ _ _)
In ice-9/boot-9.scm:
  1736:10  2 (with-exception-handler _ _ #:unwind? _ # _)
  1669:16  1 (raise-exception _ #:continuable? _)
  1667:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1667:16: In procedure raise-exception:
In procedure string-prefix?: Wrong type argument in position 2
(expecting string): #<unspecified>

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@HIDDEN               |
| www.crazy-compilers.com | compilers which you thought are impossible |





Acknowledgement sent to Hartmut Goebel <h.goebel@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#45615; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 14 Jan 2021 11:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.