unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: 02/02: build-system/r: Use invoke.
Date: Fri, 01 Jun 2018 20:52:39 -0400	[thread overview]
Message-ID: <87in72dn6w.fsf@netris.org> (raw)
In-Reply-To: <87fu27fzpv.fsf@netris.org> (Mark H. Weaver's message of "Thu, 31 May 2018 14:26:52 -0400")

Mark H Weaver <mhw@netris.org> writes:

> rekado@elephly.net (Ricardo Wurmus) writes:
>
>>  (define (pipe-to-r command params)
>>    (let ((port (apply open-pipe* OPEN_WRITE "R" params)))
>>      (display command port)
>> -    (zero? (status:exit-val (close-pipe port)))))
>> +    (let ((code (status:exit-val (close-pipe port))))
>> +      (unless (zero? code)
>> +        (raise (condition ((@@ (guix build utils) &invoke-error)
>> +                           (program "R")
>> +                           (arguments (string-append params " " command))
>> +                           (exit-status (status:exit-val code))
>> +                           (term-signal (status:term-sig code))
>> +                           (stop-signal (status:stop-sig code)))))))))
>
> The 'arguments' field should be a list, not a string.

Actually, the more serious problem is that 'params' is itself a list, so
when you apply 'string-append' to it, that will raise an exception, but
not the exception that you wanted.

      Mark

  reply	other threads:[~2018-06-02  0:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180531112428.24457.48983@vcs0.savannah.gnu.org>
     [not found] ` <20180531112430.4657B20456@vcs0.savannah.gnu.org>
2018-05-31 18:26   ` 02/02: build-system/r: Use invoke Mark H Weaver
2018-06-02  0:52     ` Mark H Weaver [this message]
2018-06-06 21:29     ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87in72dn6w.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).