guix-patches
[Top][All Lists]
Advanced

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

[bug#34040] [PATCH 2/2] import: cran: Suggest input changes.


From: Ricardo Wurmus
Subject: [bug#34040] [PATCH 2/2] import: cran: Suggest input changes.
Date: Sat, 12 Jan 2019 22:11:25 +0100
User-agent: mu4e 1.0; emacs 26.1

Hi,

Ludovic Courtès <address@hidden> writes:

> Ricardo Wurmus <address@hidden> skribis:
>
>> * guix/import/cran.scm (latest-cran-release, latest-bioconductor-release):
>> Return input-changes.
>
> LGTM!

Thank you for taking the time to review this!

>> -(define (latest-cran-release package)
>> -  "Return an <upstream-source> for the latest release of PACKAGE."
>> +(define (latest-cran-release pkg)
>
> Unless there’s a name clash I think it’s OK to keep ‘package’.

There is a name clash, which I found very surprising.  Take this procedure:

--8<---------------cut here---------------start------------->8---
(define (latest-cran-release package)
  "Return an <upstream-source> for the latest release of the package PKG."

  (define upstream-name
    (package->upstream-name package))

  (define meta
    (fetch-description 'cran upstream-name))

  (and meta
       (let ((version (assoc-ref meta "Version")))
         ;; CRAN does not provide signatures.
         (upstream-source
          (package (package-name package))
          (version version)
          (urls (cran-uri upstream-name version))
          (input-changes
           (changed-inputs
            package ; <– this is the value of the “package” field,
                    ;    not the value of the procedure argument.
            (description->package 'cran meta)))))))
--8<---------------cut here---------------end--------------->8---

That’s why I renamed the argument to “pkg”.

-- 
Ricardo






reply via email to

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