Catonano <caton...@gmail.com> 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