unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: zimoun <zimon.toutoune@gmail.com>
Cc: 45615@debbugs.gnu.org, Hartmut Goebel <h.goebel@crazy-compilers.com>
Subject: bug#45615: SWH API break?
Date: Mon, 11 Jan 2021 16:16:41 +0100	[thread overview]
Message-ID: <87y2gzcxly.fsf@gnu.org> (raw)
In-Reply-To: <86lfczsfa4.fsf@gmail.com> (zimoun's message of "Mon, 11 Jan 2021 15:45:55 +0100")

Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

> 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:
>
>   - 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. 
>
> <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?

Thanks for investigating!  Looking more closely, I think the issue is
related to this change, but to me it’s a bug: it’s now impossible to set
a field to #f.  Reported at
<https://github.com/aconchillo/guile-json/issues/69>.

Unfortunately, I can’t think of a way to work around it since it’s
pretty fundamental.

At any rate, we should add a test that exercises this in ‘tests/swh.scm’
so we don’t get caught by surprise next time.

Thanks,
Ludo’.




  reply	other threads:[~2021-01-11 15:17 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
2021-01-11 15:16       ` Ludovic Courtès [this message]
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=87y2gzcxly.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=45615@debbugs.gnu.org \
    --cc=h.goebel@crazy-compilers.com \
    --cc=zimon.toutoune@gmail.com \
    /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).