From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Othacehe Subject: bug#26987: [PATCH 2/2] build: pull: Fix compilation list construction. Date: Fri, 19 May 2017 15:55:31 +0200 Message-ID: <86wp9d7xyk.fsf@gmail.com> References: <20170519075623.13836-1-m.othacehe@gmail.com> <20170519075623.13836-3-m.othacehe@gmail.com> <87o9updmuv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBiNx-0005Od-JZ for bug-guix@gnu.org; Fri, 19 May 2017 09:56:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBiNu-0007qx-IP for bug-guix@gnu.org; Fri, 19 May 2017 09:56:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:52765) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dBiNu-0007qo-Ed for bug-guix@gnu.org; Fri, 19 May 2017 09:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dBiNu-0002XE-2N for bug-guix@gnu.org; Fri, 19 May 2017 09:56:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87o9updmuv.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 26987@debbugs.gnu.org Hi Ludo, It seems better but I can't get it to work neither : > (find (match-lambda > (('ssh _ ...) #t) > (_ #f)) > - (source-module-closure file #:select? (const #t)))) > + (source-module-closure module #:select? (const #t))))) ^ we need a list here. > > (define (all-scheme-files directory) > "Return a sorted list of Scheme files found in DIRECTORY." > > WDYT? So with --8<---------------cut here---------------start------------->8--- (define (depends-on-guile-ssh? file) "Return true if FILE is a Scheme source file that depends, directly or indirectly, on Guile-SSH." (let ((module (call-with-input-file file (lambda (port) (match (read port) (('define-module name _ ...) name)))))) (find (match-lambda (('ssh _ ...) #t) (_ #f)) (source-module-closure (list module) #:select? (const #t))))) --8<---------------cut here---------------end--------------->8--- I get, --8<---------------cut here---------------start------------->8--- ((@@ (guix build pull) depends-on-guile-ssh?) "/home/mathieu/guix/guix/ssh.scm") ERROR: In procedure open-file: ERROR: Wrong type (expecting string): #f --8<---------------cut here---------------end--------------->8--- I'm having a hard time tring to understand ,trace output. Mathieu