From 0a8fa211447670b5467d6c10f4c6ffb7f85fe15a Mon Sep 17 00:00:00 2001 From: "Robert P. Goldman" Date: Mon, 25 Jul 2022 16:01:35 -0500 Subject: [PATCH 1/2] Control value of *package* when compiling. --- lisp-action.lisp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lisp-action.lisp b/lisp-action.lisp index 8bdeb3bf..e3048762 100644 --- a/lisp-action.lisp +++ b/lisp-action.lisp @@ -110,16 +110,17 @@ Note that it will NOT be called around the performing of LOAD-OP.")) (when warnings-file (unless (equal (pathname-type warnings-file) (warnings-file-type)) (setf warnings-file nil))) - (call-with-around-compile-hook - c #'(lambda (&rest flags) - (apply 'compile-file* input-file - :output-file output-file - :external-format (component-external-format c) - :warnings-file warnings-file - (append - #+clisp (list :lib-file lib-file) - #+(or clasp ecl mkcl) (list :object-file object-file) - flags))))) + (let ((*package* (find-package* '#:common-lisp-user))) + (call-with-around-compile-hook + c #'(lambda (&rest flags) + (apply 'compile-file* input-file + :output-file output-file + :external-format (component-external-format c) + :warnings-file warnings-file + (append + #+clisp (list :lib-file lib-file) + #+(or clasp ecl mkcl) (list :object-file object-file) + flags)))))) (check-lisp-compile-results output warnings-p failure-p "~/asdf-action::format-action/" (list (cons o c)))))) (defun report-file-p (f) @@ -203,7 +204,8 @@ an OPERATION and a COMPONENT." "Perform the loading of a FASL associated to specified action (O . C), an OPERATION and a COMPONENT." (if-let (fasl (first (input-files o c))) - (load* fasl))) + (let ((*package* (find-package '#:common-lisp-user))) + (load* fasl)))) (defmethod perform ((o load-op) (c cl-source-file)) (perform-lisp-load-fasl o c)) (defmethod perform ((o load-op) (c static-file)) -- GitLab From 72aba9171ba45385bc55859fd484afbc7443b4ff Mon Sep 17 00:00:00 2001 From: "Robert P. Goldman" Date: Tue, 26 Jul 2022 16:01:31 -0500 Subject: [PATCH 2/2] Expect poor-package-control test to pass. --- test/poor-package-control.script | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/poor-package-control.script b/test/poor-package-control.script index c3fa0f3a..f049fc8a 100644 --- a/test/poor-package-control.script +++ b/test/poor-package-control.script @@ -17,12 +17,10 @@ (setf asdf:*compile-file-warnings-behaviour* :error asdf:*compile-file-failure-behaviour* :error) -(with-expected-failure ("Value of *PACKAGE* not controlled") - (let ((*package* (find-package :foobar)) - (asdf:*compile-file-warnings-behaviour* :error)) - (asdf:compile-system "test-bad-package-discipline" :force t))) +(let ((*package* (find-package :foobar)) + (asdf:*compile-file-warnings-behaviour* :error)) + (asdf:compile-system "test-bad-package-discipline" :force t)) -(with-expected-failure ("Value of *PACKAGE* not controlled") - (in-package :foobar) - (cl:let ((asdf:*compile-file-warnings-behaviour* :error)) - (asdf:compile-system "test-bad-package-discipline" :force cl:t))) +(in-package :foobar) +(cl:let ((asdf:*compile-file-warnings-behaviour* :error)) + (asdf:compile-system "test-bad-package-discipline" :force cl:t)) -- GitLab