From: Mathieu Othacehe <m.othacehe@gmail.com>
To: 26987@debbugs.gnu.org
Subject: bug#26987: [PATCH 2/2] build: pull: Fix compilation list construction.
Date: Fri, 19 May 2017 09:56:23 +0200 [thread overview]
Message-ID: <20170519075623.13836-3-m.othacehe@gmail.com> (raw)
In-Reply-To: <20170519075623.13836-1-m.othacehe@gmail.com>
* guix/build/pull.scm (depends-on-guile-ssh?): Remove.
(all-scheme-files): Use "scheme-modules" to detect all loadable
modules in given directory and rebuild a file list from those modules.
---
guix/build/pull.scm | 31 ++++++++-----------------------
1 file changed, 8 insertions(+), 23 deletions(-)
diff --git a/guix/build/pull.scm b/guix/build/pull.scm
index d2e0404b1..e6ec71a54 100644
--- a/guix/build/pull.scm
+++ b/guix/build/pull.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
+;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -36,26 +37,14 @@
;;;
;;; Code:
-(define (depends-on-guile-ssh? file)
- "Return true if FILE is a Scheme source file that depends, directly or
-indirectly, on Guile-SSH."
- (find (match-lambda
- (('ssh _ ...) #t)
- (_ #f))
- (source-module-closure file #:select? (const #t))))
-
(define (all-scheme-files directory)
"Return a sorted list of Scheme files found in DIRECTORY."
- ;; Load guix/ modules before gnu/ modules to get somewhat steadier
- ;; progress reporting.
- (sort (filter (cut string-suffix? ".scm" <>)
- (find-files directory "\\.scm"))
- (let ((guix (string-append directory "/guix"))
- (gnu (string-append directory "/gnu")))
- (lambda (a b)
- (or (and (string-prefix? guix a)
- (string-prefix? gnu b))
- (string<? a b))))))
+ (let ((modules (map module-name
+ ((@@ (guix discovery) scheme-modules) directory))))
+ (map (lambda (module)
+ (string-append directory "/"
+ (module-name->file-name module)))
+ modules)))
(cond-expand
(guile-2.2 (use-modules (language tree-il optimize)
@@ -145,11 +134,7 @@ containing the source code. Write any debugging output to DEBUG-PORT."
;; Compile the .scm files. Load all the files before compiling them to
;; work around <http://bugs.gnu.org/15602> (FIXME).
;; Filter out files depending on Guile-SSH when Guile-SSH is missing.
- (let* ((files (remove (if (false-if-exception
- (resolve-interface '(ssh session)))
- (const #f)
- depends-on-guile-ssh?)
- (all-scheme-files out)))
+ (let* ((files (all-scheme-files out))
(total (length files)))
(let loop ((files files)
(completed 0))
--
2.13.0
next prev parent reply other threads:[~2017-05-19 7:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 19:53 bug#26987: guix pull without guile-ssh Mathieu Othacehe
2017-05-19 7:56 ` bug#26987: [PATCH 0/2] Fix compilation list construction Mathieu Othacehe
2017-05-19 7:56 ` bug#26987: [PATCH 1/2] guix: modules: Export module-name->file-name Mathieu Othacehe
2017-05-19 8:18 ` Ludovic Courtès
2017-05-19 7:56 ` Mathieu Othacehe [this message]
2017-05-19 12:58 ` bug#26987: [PATCH 2/2] build: pull: Fix compilation list construction Ludovic Courtès
2017-05-19 13:55 ` Mathieu Othacehe
2017-05-19 14:26 ` Mathieu Othacehe
2017-05-19 15:41 ` Ludovic Courtès
2017-05-25 12:33 ` Ludovic Courtès
2017-06-02 9:16 ` Mathieu Othacehe
2017-06-02 15:09 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170519075623.13836-3-m.othacehe@gmail.com \
--to=m.othacehe@gmail.com \
--cc=26987@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).