From: zimoun <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 45615@debbugs.gnu.org, Hartmut Goebel <h.goebel@crazy-compilers.com>
Subject: bug#45615: SWH API break?
Date: Mon, 11 Jan 2021 15:45:55 +0100 [thread overview]
Message-ID: <86lfczsfa4.fsf@gmail.com> (raw)
In-Reply-To: <87a6tffwi9.fsf@gnu.org>
Hi Ludo,
On Mon, 11 Jan 2021 at 14:12, Ludovic Courtès <ludo@gnu.org> 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/Genivia/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.
--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>
next prev parent reply other threads:[~2021-01-11 14:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-02 22:14 bug#45615: Wrong type argument in "guix lint -c archival" Hartmut Goebel
2021-01-07 15:41 ` bug#45615: SWH API break? zimoun
2021-01-11 13:12 ` Ludovic Courtès
2021-01-11 14:45 ` zimoun [this message]
2021-01-11 15:16 ` Ludovic Courtès
2021-01-14 11:09 ` Ludovic Courtès
2021-01-21 10:25 ` bug#45615: Wrong type argument in "guix lint -c archival" Ludovic Courtès
2021-01-16 16:59 ` Aleix via web
2021-01-21 10:27 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86lfczsfa4.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=45615@debbugs.gnu.org \
--cc=h.goebel@crazy-compilers.com \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).