help-guix
[Top][All Lists]
Advanced

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

Re: tree doesn't get called


From: Ricardo Wurmus
Subject: Re: tree doesn't get called
Date: Tue, 09 May 2017 19:20:40 +0200
User-agent: mu4e 0.9.18; emacs 25.2.1

Catonano <address@hidden> writes:

>> Here’s a version that works for me:
>>
>>
>>                  ;; Compile .scm files and install.
>>                  (every (lambda (file)
>>                           (let ((go-file (string-append module-dir "/"
>>                                                         (basename file
>> ".scm") ".go")))
>>                             ;; Install source module.
>>                             (install-file file module-dir)
>>                             ;; Compile and install module.
>>                             (zero? (system* "guild" "compile" "-L" cwd
>>                                             "-o" go-file file))))
>>
>
> The differences with my version is that you use install-file insted of
> copy-file  and you pass the -L (cwd) switch to guild

These were mostly cosmetic changes.  I evaluate “(getcwd)” once and bind
it to “cwd” instead of evaluating it again and again for each file.
This is not what fixed the crash.

“install-file” only takes a file and a directory, unlike “copy-file”
which takes a source file name and a target file name.  I did this just
to simplify the code.

> I wonder what was causing my issue ?

Another difference is that I’m using “basename”.  Your use of “match”
didn’t work, because the match pattern wasn’t correct for the
“find-files” case.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net




reply via email to

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