Dear Robert, I have two local branches with these patches. May I merge into master?
The input-string function was added for symmetry while hacking cl-launch, though I ended up not using it, to remain compatible with older versions of uiop. The uiop:getenv bug was discovered while fixing cl-launch regressions on LispWorks. The fasl-op thing is what he had discussed before (only minimally manually tested). —♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org If you could kick the person in the pants responsible for most of your trouble, you wouldn't sit for a month. — Theodore Roosevelt
From a62f539c53cd77fd6bc0841b3edc6baeff7cf6ce Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tu...@google.com> Date: Tue, 29 Jul 2014 00:47:54 -0400 Subject: [PATCH 1/2] Add input-string, a symmetric function to output-string. --- uiop/stream.lisp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/uiop/stream.lisp b/uiop/stream.lisp index 7103dbd..db7ae94 100644 --- a/uiop/stream.lisp +++ b/uiop/stream.lisp @@ -12,7 +12,7 @@ #:encoding-external-format #:*encoding-external-format-hook* #:default-encoding-external-format #:*default-encoding* #:*utf-8-external-format* #:with-safe-io-syntax #:call-with-safe-io-syntax #:safe-read-from-string - #:with-output #:output-string #:with-input + #:with-output #:output-string #:with-input #:input-string #:with-input-file #:call-with-input-file #:with-output-file #:call-with-output-file #:null-device-pathname #:call-with-null-input #:with-null-input #:call-with-null-output #:with-null-output @@ -263,8 +263,14 @@ Otherwise, signal an error." (defmacro with-input ((input-var &optional (value input-var)) &body body) "Bind INPUT-VAR to an input stream, coercing VALUE (default: previous binding of INPUT-VAR) as per CALL-WITH-INPUT, and evaluate BODY within the scope of this binding." - `(call-with-input ,value #'(lambda (,input-var) ,@body)))) - + `(call-with-input ,value #'(lambda (,input-var) ,@body))) + + (defun input-string (&optional input) + "If the desired INPUT is a string, return that string; otherwise slurp the INPUT into a string +and return that" + (if (stringp input) + input + (with-input (input) (funcall 'slurp-stream-string input))))) ;;; Null device (with-upgradability () -- 2.0.0.526.g5318336
From 4aa0fe35946585931eff0f9bbcebda0ea803de91 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tu...@google.com> Date: Sat, 2 Aug 2014 06:10:54 -0400 Subject: [PATCH 2/2] uiop:getcwd wasn't doing what we wanted on LispWorks. --- uiop/os.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uiop/os.lisp b/uiop/os.lisp index 522f4a3..86ed3ba 100644 --- a/uiop/os.lisp +++ b/uiop/os.lisp @@ -262,7 +262,7 @@ suitable for use as a directory name to segregate Lisp FASLs, C dynamic librarie #+ecl (ext:getcwd) #+gcl (let ((*default-pathname-defaults* #p"")) (truename #p"")) #+genera *default-pathname-defaults* ;; on a Lisp OS, it *is* canonical! - #+lispworks (system:current-directory) + #+lispworks (hcl:get-working-directory) #+mkcl (mk-ext:getcwd) #+sbcl (sb-ext:parse-native-namestring (sb-unix:posix-getcwd/)) #+xcl (extensions:current-directory) -- 2.0.0.526.g5318336
From 8ae2dd1bbe26539e90c70c1178615387afecc1a6 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tu...@google.com> Date: Sat, 2 Aug 2014 06:55:01 -0400 Subject: [PATCH] Move support for fasl-op and other legacy names for bundle operations to a contrib. --- bundle.lisp | 14 -------------- contrib/fasl-op.lisp | 31 +++++++++++++++++++++++++++++++ interface.lisp | 1 - 3 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 contrib/fasl-op.lisp diff --git a/bundle.lisp b/bundle.lisp index 5a11947..c2b70e9 100644 --- a/bundle.lisp +++ b/bundle.lisp @@ -10,7 +10,6 @@ #:bundle-op #:bundle-type #:program-system #:bundle-system #:bundle-pathname-type #:bundlable-file-p #:direct-dependency-files #:monolithic-op #:monolithic-bundle-op #:operation-monolithic-p - #:fasl-op #:load-fasl-op #:monolithic-fasl-op #:binary-op #:monolithic-binary-op #:basic-compile-bundle-op #:prepare-bundle-op #:compile-bundle-op #:load-bundle-op #:monolithic-compile-bundle-op #:monolithic-load-bundle-op #:lib-op #:monolithic-lib-op @@ -529,16 +528,3 @@ To continue, push :asdf-use-unsafe-mac-bundle-op onto *FEATURES*.~%~T~ Please report to ASDF-DEVEL if this works for you."))) -;;; Backward compatibility with pre-3.1.2 names -(defclass fasl-op (selfward-operation) - ((selfward-operation :initform 'compile-bundle-op :allocation :class))) -(defclass load-fasl-op (selfward-operation) - ((selfward-operation :initform 'load-bundle-op :allocation :class))) -(defclass binary-op (selfward-operation) - ((selfward-operation :initform 'deliver-asd-op :allocation :class))) -(defclass monolithic-fasl-op (selfward-operation) - ((selfward-operation :initform 'monolithic-compile-bundle-op :allocation :class))) -(defclass monolithic-load-fasl-op (selfward-operation) - ((selfward-operation :initform 'monolithic-load-bundle-op :allocation :class))) -(defclass monolithic-binary-op (selfward-operation) - ((selfward-operation :initform 'monolithic-deliver-asd-op :allocation :class))) diff --git a/contrib/fasl-op.lisp b/contrib/fasl-op.lisp new file mode 100644 index 0000000..acbd5cd --- /dev/null +++ b/contrib/fasl-op.lisp @@ -0,0 +1,31 @@ +(uiop:define-package :asdf/contrib/fasl-op + (:use :common-lisp :uiop + :asdf :asdf/component :asdf/operation :asdf/lisp-action :asdf/bundle)) + +(in-package :asdf/contrib/fasl-op) + +;;; Backward compatibility with pre-3.1.2 names + +(eval-when (:compile-toplevel :load-toplevel :execute) + (defun frob-symbol (sym) + (loop :for dest :in '(:asdf/bundle :asdf/interface) :do + (uiop/package::ensure-import + (symbol-name sym) (find-package dest) (symbol-package sym) + (make-hash-table :test 'equal) (make-hash-table :test 'equal))))) + +(defmacro declare-ops (&rest ops) + `(progn + ,@(loop :for (compat-name current-name) :in ops :append + `((defclass ,compat-name (selfward-operation) + ((selfward-operation :initform ',current-name :allocation :class))) + (defmethod output-files ((o ,compat-name) (c component)) + (output-files (find-operation o ',current-name) c)) + (frob-symbol ',compat-name))))) + +(declare-ops + (fasl-op compile-bundle-op) + (load-fasl-op load-bundle-op) + (binary-op deliver-asd-op) + (monolithic-fasl-op monolithic-compile-bundle-op) + (monolithic-load-fasl-op monolithic-load-bundle-op) + (monolithic-binary-op monolithic-deliver-asd-op)) diff --git a/interface.lisp b/interface.lisp index f637b3a..35db8c4 100644 --- a/interface.lisp +++ b/interface.lisp @@ -36,7 +36,6 @@ #:component-load-dependencies #:run-shell-command ; deprecated, do not use #:bundle-op #:monolithic-bundle-op #:precompiled-system #:compiled-file #:bundle-system #:program-system #:make-build - #:fasl-op #:load-fasl-op #:monolithic-fasl-op #:binary-op #:monolithic-binary-op #:basic-compile-bundle-op #:prepare-bundle-op #:compile-bundle-op #:load-bundle-op #:monolithic-compile-bundle-op #:monolithic-load-bundle-op #:lib-op #:dll-op #:deliver-asd-op #:program-op #:image-op -- 2.0.0.526.g5318336
_______________________________________________ Asdf-devel mailing list Asdf-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel