From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvFef-0002GA-KO for guix-patches@gnu.org; Thu, 30 Aug 2018 01:38:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fvFec-0006CV-FU for guix-patches@gnu.org; Thu, 30 Aug 2018 01:38:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:32788) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fvFec-0006CR-Aa for guix-patches@gnu.org; Thu, 30 Aug 2018 01:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fvFec-00078X-6e for guix-patches@gnu.org; Thu, 30 Aug 2018 01:38:02 -0400 Subject: [bug#32582] [PATCH 4/5] build-system/asdf: Adopt asdf conventions. Resent-Message-ID: From: Andy Patterson Date: Thu, 30 Aug 2018 01:36:31 -0400 Message-Id: <20180830053632.26414-4-ajpatter@uwaterloo.ca> In-Reply-To: <20180830012813.7830cfc6@uwaterloo.ca> References: <20180830012813.7830cfc6@uwaterloo.ca> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 32582@debbugs.gnu.org The asdf documentation specifies that asdf:load-asd should be preferred to calling load on a system definition file. * guix/build/lisp-utils.scm (compile-system): Replace load with asdf:load-asd. (system-dependencies): Likewise. (test-system): Likewise. --- guix/build/lisp-utils.scm | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/guix/build/lisp-utils.scm b/guix/build/lisp-utils.scm index 7c0a68ca9..6470cfec9 100644 --- a/guix/build/lisp-utils.scm +++ b/guix/build/lisp-utils.scm @@ -152,8 +152,7 @@ with PROGRAM." first." (lisp-eval-program `((require :asdf) - (let ((*package* (find-package :asdf))) - (load ,asd-file)) + (asdf:load-asd (truename ,asd-file) :name ,(normalize-string system)) (asdf:operate 'asdf:compile-bundle-op ,system)))) (define (system-dependencies system asd-file) @@ -162,8 +161,7 @@ asdf:system-depends-on. First load the system's ASD-FILE." (define deps-file ".deps.sexp") (define program `((require :asdf) - (let ((*package* (find-package :asdf))) - (load ,asd-file)) + (asdf:load-asd (truename ,asd-file) :name ,(normalize-string system)) (with-open-file (stream ,deps-file :direction :output) (format stream @@ -203,19 +201,18 @@ asdf:system-depends-on. First load the system's ASD-FILE." Also load TEST-ASD-FILE if necessary." (lisp-eval-program `((require :asdf) - (let ((*package* (find-package :asdf))) - (load ,asd-file) - ,@(if test-asd-file - `((load ,test-asd-file)) - ;; Try some likely files. - (map (lambda (file) - `(when (uiop:file-exists-p ,file) - (load ,file))) - (list - (string-append system "-tests.asd") - (string-append system "-test.asd") - "tests.asd" - "test.asd")))) + (asdf:load-asd (truename ,asd-file) :name ,(normalize-string system)) + ,@(if test-asd-file + `((asdf:load-asd (truename ,test-asd-file))) + ;; Try some likely files. + (map (lambda (file) + `(when (uiop:file-exists-p ,file) + (asdf:load-asd (truename ,file)))) + (list + (string-append system "-tests.asd") + (string-append system "-test.asd") + "tests.asd" + "test.asd"))) (asdf:test-system ,system)))) (define (string->lisp-keyword . strings) -- 2.18.0