From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: tree doesn't get called Date: Tue, 09 May 2017 19:20:40 +0200 Message-ID: <87pofihrpz.fsf@elephly.net> References: <20170505172459.158487fc@openmailbox.org> <87y3u7khhu.fsf@elephly.net> <874lwvje44.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d88og-00065z-Bp for help-guix@gnu.org; Tue, 09 May 2017 13:20:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d88oc-0003b0-Us for help-guix@gnu.org; Tue, 09 May 2017 13:20:54 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21038) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d88oc-0003ao-MF for help-guix@gnu.org; Tue, 09 May 2017 13:20:50 -0400 In-reply-to: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Catonano Cc: help-guix Catonano 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