[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45615: SWH API break?
From: |
Ludovic Courtès |
Subject: |
bug#45615: SWH API break? |
Date: |
Mon, 11 Jan 2021 14:12:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi!
zimoun <zimon.toutoune@gmail.com> 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 | 'ongoing
> (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’.
bug#45615: Wrong type argument in "guix lint -c archival", Aleix via web, 2021/01/16