guix-devel
[Top][All Lists]
Advanced

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

Re: New review checklist


From: Liliana Marie Prikler
Subject: Re: New review checklist
Date: Fri, 01 Apr 2022 19:03:47 +0200
User-agent: Evolution 3.42.1

Hi Maxime,

Am Freitag, dem 01.04.2022 um 08:30 +0200 schrieb Maxime Devos:
> Liliana Marie Prikler schreef op vr 01-04-2022 om 06:14 [+0200]:
> > It won't be added to Guix.  Here's why it won't.
> > You appear to believe that
> > [...]
> > [ ] hard-coding the commit field is a good idea
> 
> Does the following count:
> 
> (define-public foo
>   (package
>     (name "foo")
>     (version "1.0.0")
>     (source
>       (origin
>         [...]
>         (file-name (git-file-name name version))
>         ;; Upstream does not tag versions, see
>         ;; <https://foo.bar/versions> for which commit
>         ;; corresponds to which version.
>         ;;
>         ;; (alternatively)
>         ;;
>         ;; Upstream deletes old tags every N months,
>         ;; so explicitly write the commit here.;
>         ;;
>         ;; (alternatively)
>         ;;
>         ;; There is consensus that the benefits of explicit commits
>         ;; outweigh the downsides, see
>         ;; <https://actually.I.dont.think.there.is.consensus?>
>         (commit "cabba9e..."))
>    [...]))
> 
> -- would the commit need to be let-bound here?
This discussion has already been had elsewhere, but to reiterate, my
reasoning is that if you can't trust upstream tags to remain valid, you
need another proof that the VERSION <-> COMMIT equivalence holds. 
Referring to another authority (as can be done in the case of Minetest
packages) is fine for me personally, but in the general case (e.g. your
#2 without further context) I'd say that let-binding the commit leads
to the least amount of surprises for everyone.

In the particular case of Minetest, another plausible style would be
(let ((commit ...)
      (revision ACTUAL-REVISION-OR-#f))
  (package 
    ...
    ;; tagged TAG as of DATE
    ;; For a complete list of versions, see <LINK>
    (version "just the version") 
    (source (origin ...
              ;; Upstream is known to yank tags, so always use commits.
              (commit commit)))))

Cheers



reply via email to

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