From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catonano Subject: Re: tree doesn't get called Date: Tue, 9 May 2017 20:12:35 +0200 Message-ID: References: <20170505172459.158487fc@openmailbox.org> <87y3u7khhu.fsf@elephly.net> <874lwvje44.fsf@elephly.net> <87pofihrpz.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f4030438914cde7d76054f1b4c43 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d89ck-0006fa-Bc for help-guix@gnu.org; Tue, 09 May 2017 14:12:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d89cj-0006IE-8A for help-guix@gnu.org; Tue, 09 May 2017 14:12:38 -0400 Received: from mail-wr0-x22f.google.com ([2a00:1450:400c:c0c::22f]:35530) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d89ci-0006Gq-Uy for help-guix@gnu.org; Tue, 09 May 2017 14:12:37 -0400 Received: by mail-wr0-x22f.google.com with SMTP id z52so10278128wrc.2 for ; Tue, 09 May 2017 11:12:36 -0700 (PDT) In-Reply-To: <87pofihrpz.fsf@elephly.net> 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: Ricardo Wurmus Cc: help-guix --f4030438914cde7d76054f1b4c43 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2017-05-09 19:20 GMT+02:00 Ricardo Wurmus : > > Catonano writes: > > >> Here=E2=80=99s 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 =E2=80=9C(getcwd)=E2=80= =9D once and bind > it to =E2=80=9Ccwd=E2=80=9D instead of evaluating it again and again for = each file. > Yes I get that, I wrote "-L (cwd)" ust for brevity ;-) > This is not what fixed the crash. > mmm ok > > =E2=80=9Cinstall-file=E2=80=9D only takes a file and a directory, unlike = =E2=80=9Ccopy-file=E2=80=9D > 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=E2=80=99m using =E2=80=9Cbasename=E2=80=9D. = Your use of =E2=80=9Cmatch=E2=80=9D > didn=E2=80=99t work, because the match pattern wasn=E2=80=99t correct for= the > =E2=80=9Cfind-files=E2=80=9D case. > My use of match didn't work, but it hanged also when I used an explicit lis= t Admittedly I had probably messed up the call to basename Oh well Thanks anyway --f4030438914cde7d76054f1b4c43 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


2017-05-09 19:20 GMT+02:00 Ricardo Wurmus <rekado@elephly.net>= :

Catonano <catonano@gmail.com&g= t; writes:

>> Here=E2=80=99s a version that works for me:
>>
>>
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; C= ompile .scm files and install.
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (eve= ry (lambda (file)
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let ((go-file (string-append module-dir &qu= ot;/"
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(basename fil= e
>> ".scm") ".go")))
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Install source module.
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(install-file file module-dir)
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Compile and install module.
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(zero? (system* "guild" &qu= ot;compile" "-L" cwd
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0"-o" go-file file))))
>>
>
> The differences with my version is that you use install-file insted of=
> copy-file=C2=A0 and you pass the -L (cwd) switch to guild

These were mostly cosmetic changes.=C2=A0 I evaluate =E2=80=9C(getcw= d)=E2=80=9D once and bind
it to =E2=80=9Ccwd=E2=80=9D instead of evaluating it again and again for ea= ch file.

Yes I get that, I wrote "-L (cwd)&quo= t; ust for brevity ;-)
=C2=A0
This is not what fixed the crash.

= mmm ok
=C2=A0

=E2=80=9Cinstall-file=E2=80=9D only takes a file and a directory, unlike = =E2=80=9Ccopy-file=E2=80=9D
which takes a source file name and a target file name.=C2=A0 I did this jus= t
to simplify the code.

> I wonder what was causing my issue ?

Another difference is that I=E2=80=99m using =E2=80=9Cbasename=E2=80= =9D.=C2=A0 Your use of =E2=80=9Cmatch=E2=80=9D
didn=E2=80=99t work, because the match pattern wasn=E2=80=99t correct for t= he
=E2=80=9Cfind-files=E2=80=9D case.

My use of match did= n't work, but it hanged also when I used an explicit list

=
Admittedly I had probably messed up the call to = basename

Oh well

Thanks anyway
--f4030438914cde7d76054f1b4c43--