[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#66491] [maintenance] hydra: build-package-metadata: Add boolean for
From: |
Ludovic Courtès |
Subject: |
[bug#66491] [maintenance] hydra: build-package-metadata: Add boolean for Git submodules in sources.json. |
Date: |
Sat, 14 Oct 2023 19:23:13 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi,
Simon Tournier <zimon.toutoune@gmail.com> skribis:
> This format had been discussed in
> <https://gitlab.softwareheritage.org/swh/devel/swh-loader-git/-/issues/4751#note_150607>
>
> * hydra/build-package-metadata.scm (origin->json)[resolve]: Add the keyword
> 'submodule' when the Git reference is recursive.
[...]
> ,@(if (eq? method git-fetch)
> - `(("git_ref" . ,(git-reference-commit uri)))
> + `(("git_ref" . ,(git-reference-commit uri))
> + ,@(if (git-reference-recursive? uri)
> + '(("submodule" . "true"))
> + '()))
I think you’ll want to make it #t instead of "true", so that it
translates to the Boolean true, not the string "true":
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (scm->json-string '((a . "true")))
$8 = "{\"a\":\"true\"}"
scheme@(guile-user)> (scm->json-string '((a . #true)))
$9 = "{\"a\":true}"
--8<---------------cut here---------------end--------------->8---
Otherwise LGTM!
Thanks,
Ludo’.