all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#32017] import: elpa: Check if 'fetch-elpa-package' rest argument is null.
@ 2018-06-30  7:55 Oleg Pykhalov
  2018-07-02 15:43 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Oleg Pykhalov @ 2018-06-30  7:55 UTC (permalink / raw)
  To: 32017


[-- Attachment #1.1: Type: text/plain, Size: 704 bytes --]

Hello Guix,

This patch fixes the following error:
--8<---------------cut here---------------start------------->8---
$ guix import elpa -a melpa proc-net
Backtrace:
           6 (primitive-load "/home/natsu/.config/guix/current/bin/guix")
In guix/ui.scm:
  1570:12  5 (run-guix-command _ . _)
In guix/scripts/import.scm:
   114:11  4 (guix-import . _)
In guix/scripts/import/elpa.scm:
   108:23  3 (guix-import-elpa . _)
In guix/import/elpa.scm:
    247:2  2 (elpa->guix-package _ _)
   190:47  1 (fetch-elpa-package _ _)
In unknown file:
           0 (car ())

ERROR: In procedure car:
In procedure car: Wrong type (expecting pair): ()
--8<---------------cut here---------------end--------------->8---


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: [PATCH] import: elpa: Check if 'fetch-elpa-package' rest argument is --]
[-- Type: text/x-patch, Size: 1041 bytes --]

From 5b06ab52ada54fc4c42c87400a7b635843cf1542 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Sat, 30 Jun 2018 10:51:45 +0300
Subject: [PATCH] import: elpa: Check if 'fetch-elpa-package' rest argument is
 null.

* guix/import/elpa.scm (fetch-elpa-package): Check if 'rest' is null.
---
 guix/import/elpa.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index 65e0be45a..869e70ee2 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -187,7 +187,7 @@ include VERSION."
              (url (package-source-url kind name ver repo)))
          (make-elpa-package name ver
                             (ensure-list reqs) synopsis kind
-                            (package-home-page (first rest))
+                            (package-home-page (if (null? rest) #f (first rest)))
                             (fetch-package-description kind name repo)
                             url)))
       (_ #f))))
-- 
2.18.0


[-- Attachment #1.3: Type: text/plain, Size: 15 bytes --]


Thanks,
Oleg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#32017] import: elpa: Check if 'fetch-elpa-package' rest argument is null.
  2018-06-30  7:55 [bug#32017] import: elpa: Check if 'fetch-elpa-package' rest argument is null Oleg Pykhalov
@ 2018-07-02 15:43 ` Ludovic Courtès
  2018-07-03  4:23   ` bug#32017: " Oleg Pykhalov
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2018-07-02 15:43 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 32017

Hi Oleg,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

> From 5b06ab52ada54fc4c42c87400a7b635843cf1542 Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> Date: Sat, 30 Jun 2018 10:51:45 +0300
> Subject: [PATCH] import: elpa: Check if 'fetch-elpa-package' rest argument is
>  null.
>
> * guix/import/elpa.scm (fetch-elpa-package): Check if 'rest' is null.
> ---
>  guix/import/elpa.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
> index 65e0be45a..869e70ee2 100644
> --- a/guix/import/elpa.scm
> +++ b/guix/import/elpa.scm
> @@ -187,7 +187,7 @@ include VERSION."
>               (url (package-source-url kind name ver repo)))
>           (make-elpa-package name ver
>                              (ensure-list reqs) synopsis kind
> -                            (package-home-page (first rest))
> +                            (package-home-page (if (null? rest) #f (first rest)))
>                              (fetch-package-description kind name repo)

As per our coding style guidelines (info "(guix) Data Types and Pattern
Matching"), it would be best to write:

  (match rest
    (() #f)
    ((one) one))

Otherwise LGTM, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#32017: import: elpa: Check if 'fetch-elpa-package' rest argument is null.
  2018-07-02 15:43 ` Ludovic Courtès
@ 2018-07-03  4:23   ` Oleg Pykhalov
  0 siblings, 0 replies; 3+ messages in thread
From: Oleg Pykhalov @ 2018-07-03  4:23 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 32017, 32017-done

[-- Attachment #1: Type: text/plain, Size: 1461 bytes --]

Hello Ludovic,

Thank you for review and improvements.

ludo@gnu.org (Ludovic Courtès) writes:

> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>
>> From 5b06ab52ada54fc4c42c87400a7b635843cf1542 Mon Sep 17 00:00:00 2001
>> From: Oleg Pykhalov <go.wigust@gmail.com>
>> Date: Sat, 30 Jun 2018 10:51:45 +0300
>> Subject: [PATCH] import: elpa: Check if 'fetch-elpa-package' rest argument is
>>  null.
>>
>> * guix/import/elpa.scm (fetch-elpa-package): Check if 'rest' is null.
>> ---
>>  guix/import/elpa.scm | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
>> index 65e0be45a..869e70ee2 100644
>> --- a/guix/import/elpa.scm
>> +++ b/guix/import/elpa.scm
>> @@ -187,7 +187,7 @@ include VERSION."
>>               (url (package-source-url kind name ver repo)))
>>           (make-elpa-package name ver
>>                              (ensure-list reqs) synopsis kind
>> -                            (package-home-page (first rest))
>> +                            (package-home-page (if (null? rest) #f (first rest)))
>>                              (fetch-package-description kind name repo)
>
> As per our coding style guidelines (info "(guix) Data Types and Pattern
> Matching"), it would be best to write:
>
>   (match rest
>     (() #f)
>     ((one) one))
>
> Otherwise LGTM, thanks!

OK, pushed as ae6fa00af02399e2ffadccc81bd7718cc7c26f10

Oleg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-03  4:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-30  7:55 [bug#32017] import: elpa: Check if 'fetch-elpa-package' rest argument is null Oleg Pykhalov
2018-07-02 15:43 ` Ludovic Courtès
2018-07-03  4:23   ` bug#32017: " Oleg Pykhalov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.