guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#57460] [PATCH 00/19] Refresh to specific version


From: Ludovic Courtès
Subject: [bug#57460] [PATCH 00/19] Refresh to specific version
Date: Sat, 24 Sep 2022 11:24:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> * guix/import/git.scm
>   (latest-tag): Add keyword-argument 'version'. If version is given, try to
>   find the respective version tag.
>   (latest-git-tag-version): Add keyword-argument 'version' and pass it on to
>   called functions.
>   (latest-releease) Rename to (import-release), add keyword-argument 'version'
>   and pass it on to called functions.

(Same comment as before.)

> +(define* (latest-tag url
> +                     #:key prefix suffix delim pre-releases? (version #f))
>    "Return the latest version and corresponding tag available from the Git
>  repository at URL."

Please augment the docstring to explain the meaning of #:version.

> +      (let ((version-to-pick
> +             (if version
> +                 (filter (lambda (vt) (string=? version (car vt)))
> +                         versions->tags)
> +                 versions->tags)))

Rather:

  (let ((versions (if version
                      (filter (match-lambda
                                ((candidate-version . tag)
                                 (string=? version candidate-version)))
                              versions->tag)
                      versions->tag)))
    (if (null? versions) …))

> +            (match (last version-to-pick)
> +                   ((version . tag)
> +                    (values version tag)))))))))

Please adjust the indentation of the ‘match’ form so it matches what is
done elsewhere.

Otherwise LGTM.

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]