Subject: Re: [PATCH v16 6/6] import: crate: Parameterized importing of dev dependencies.

From: Hartmut Goebel <[email-masked]>
Date: Tue, 10 Nov 2020 23:21:35 +0100

Am 10.11.20 um 22:39 schrieb Hartmut Goebel:
> @@ -255,9 +258,12 @@ latest version of CRATE-NAME."
>         (let* ((dependencies (crate-version-dependencies version*))
>                (dep-crates dev-dep-crates (partition normal-dependency? dependencies))
>                (cargo-inputs (sort-map-dependencies dep-crates))
> -              (cargo-development-inputs '()))
> +              (cargo-development-inputs (if include-dev-deps?
> +                                            (sort-map-dependencies dev-dep-crates)
> +                                            '())))
>           (values
> -          (make-crate-sexp #:name crate-name
> +          (make-crate-sexp #:build? include-dev-deps?
> +                           #:name crate-name

I'm curious about this: The value of "include-dev-deps?" determines
whether the the package will be have #:skip-build set #t or #f? If this
is intended, it should be described in the doc-string and in the changelog.

> --- a/guix/scripts/import/crate.scm
> +++ b/guix/scripts/import/crate.scm
> @@ -96,13 +96,13 @@ Import and convert the crate.io package for PACKAGE-NAME.\n"))
>  
>         (if (assoc-ref opts 'recursive)
>             (crate-recursive-import name #:version version)
> -           (let ((sexp (crate->guix-package name #:version version)))
> +           (let ((sexp (crate->guix-package name #:version version #:include-dev-deps? #t)))
>               (unless sexp
>                 (leave (G_ "failed to download meta-data for package '~a'~%")
>                        (if version
>                            (string-append name "@" version)
>                            name)))
> -             sexp)))
> +             (list sexp))))

This last line change looks like an error. Is it intended?

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | [email-masked]               |
| www.crazy-compilers.com | compilers which you thought are impossible |