Commit 3a4110f5 authored by Robert P. Goldman's avatar Robert P. Goldman

Merge branch 'master' into docs

parents f66eb3a3 1a92ac43
......@@ -75,7 +75,7 @@
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "3.1.0.117" ;; to be automatically updated by make bump-version
:version "3.1.0.119" ;; to be automatically updated by make bump-version
:depends-on ()
#+asdf3 :encoding #+asdf3 :utf-8
:class #.(if (find-class 'package-inferred-system nil) 'package-inferred-system 'system)
......
;; fast-compile-op: compile just one file in the current process,
;; loading all dependencies as source.
;; How to use it:
;; (1) your build system compiles all your system's dependencies as bundle.
;; (2) For each component in the system, invoke a process that
;; (a) loads all the transitive dependencies as bundles
;; (b) use register-preloaded-system
;; to tell ASDF the direct dependencies are loaded
;; (c) use fast-compile-op on each of the components in the system
;; (3) when they are all done, combine the fasls in a bundle.
#+sbcl (setf sb-ext:*evaluator-mode* :interpret)
(defclass fast-compile-op (basic-compile-op selfward-operation)
((selfward-operation :initform 'prepare-source-op)))
(defmethod action-description ((o fast-compile-op) (c component))
(declare (ignorable o))
(format nil (compatfmt "~@<fast compiling ~3i~_~A~@:>") c))
(defmethod perform ((o fast-compile-op) (c component))
(let (#+sbcl (sb-ext:*evaluator-mode* :compile))
(perform (make-operation 'compile-op) c)))
(defmethod output-files ((o fast-compile-op) (c component))
(output-files (make-operation 'compile-op) c))
(defmethod input-files ((o fast-compile-op) (c component))
(input-files (make-operation 'compile-op) c))
;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; buffer-read-only: t; -*-
;;; This is ASDF 3.1.0.117: Another System Definition Facility.
;;; This is ASDF 3.1.0.119: Another System Definition Facility.
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
......
......@@ -25,7 +25,7 @@
(unless (find-system :lisp-invocation nil)
(leave-test "Couldn't find lisp-invocation. Skipping the rest of the test." 0))
(load-system :lisp-invocation)
(unless (version-satisfies (find-system :lisp-invocation) "1")
(unless (version-satisfies (find-system :lisp-invocation) "1.0.1")
(leave-test "Lisp-invocation library isn't new enough to test successfully. Skipping test-program." 0))
;; Disable any user source registry.
(initialize-source-registry `(:source-registry :ignore-inherited-configuration))
......@@ -34,16 +34,15 @@
(assert-equal
0
(nth-value 2
(run-program
(symbol-call
:lisp-invocation :lisp-invocation-arglist
#+allegro :lisp-path #+allegro *lisp*
:cross-compile nil
:load (native-namestring (subpathname *test-directory* "make-hello-world.lisp"))
:eval (format nil "(asdf-test::make-hello-~a)" kind))
:input nil :ignore-error-status t
:output (list *standard-output* :linewise t :prefix "stdout: ")
:error-output (list *error-output* :linewise t :prefix "stderr: ")))))
(lisp-invocation:invoke-lisp
#+allegro :lisp-path #+allegro *lisp*
:cross-compile nil
:load (native-namestring (subpathname *test-directory* "make-hello-world.lisp"))
:eval (format nil "(asdf-test::make-hello-~a)" kind)
:run-program-args
`(:input nil :ignore-error-status t
:output (,*standard-output* :linewise t :prefix "stdout: ")
:error-output (,*error-output* :linewise t :prefix "stderr: "))))))
#-(or (and lispworks os-macosx)
(and ecl os-macosx))
......@@ -60,28 +59,24 @@
(assert-equal
(nest
#+lispworks (last)
(run-program
(symbol-call
:lisp-invocation :lisp-invocation-arglist
#+allegro :lisp-path #+allegro *lisp*
:cross-compile nil
:image-path (native-namestring img)
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)")
:output :lines :error-output t))
(lisp-invocation:invoke-lisp
#+allegro :lisp-path #+allegro *lisp*
:cross-compile nil
:image-path (native-namestring img)
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)"
:run-program-args '(:output :lines :error-output t)))
'("hello, world"))
(DBG "- now, use it with arguments")
#-(or lispworks scl) ;; These can't be passed arguments the normal way
(assert-equal
(run-program
(symbol-call
:lisp-invocation :lisp-invocation-arglist
#+allegro :lisp-path #+allegro *lisp*
:image-path (native-namestring img)
:cross-compile nil
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)"
:arguments '("a" "b c" "d"))
:output :lines :error-output t)
(lisp-invocation:invoke-lisp
#+allegro :lisp-path #+allegro *lisp*
:image-path (native-namestring img)
:cross-compile nil
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)"
:arguments '("a" "b c" "d")
:run-program-args '(:output :lines :error-output t))
'("hello, world"
"You passed 3 arguments:"
" \"a\""
......
......@@ -305,6 +305,18 @@
(assert-equal (read-file-lines pn) '("Hello, World"))
(delete-file pn))
(assert
(not (probe-file
(let ((s 'outer-s))
(with-temporary-file (:stream s :pathname p :direction :io :prefix "LEP")
(assert (open-stream-p s))
(DBG :wsp s p (probe-file p))
(println "Same thing with :close-stream" s)
:close-stream
(assert-equal s 'outer-s) ;; the stream s (1) has been closed and (2) is no longer in scope.
(assert-equal (read-file-lines p) '("Same thing with :close-stream"))
p)))))
(DBG :ensure-gethash)
(let ((h (make-hash-table :test 'equal)))
(assert-equal (multiple-value-list (gethash 1 h 2)) '(2 nil))
......
......@@ -13,56 +13,64 @@ All exported symbols are reexported in a convenience package UIOP.
The files that constitute UIOP are, in loading order:
* package: to deal with packages and their symbols, most notably including
DEFINE-PACKAGE, a variant of defpackage capable of hot-upgrade.
* package: deals with packages and their symbols, most notably including
define-package, a variant of defpackage capable of hot-upgrade, or
symbol-call and find-symbol* that are also useful for use in .asd files
before packages have been defined.
* common-lisp: to let you paper over various sub-standard implementations.
* common-lisp: lets you paper over various sub-standard implementations.
Big offenders are Corman, GCL, Genera, MCL, all of them unmaintained.
Supported without serious issues are:
ABCL, Allegro, CCL, CMUCL, CLISP, ECL, LispWorks, MKCL, SBCL, XCL.
ABCL, Allegro, CCL, CMUCL, CLISP, ECL, LispWorks, MKCL, SBCL, SCL, XCL.
* utility: to provide macros and functions that do not involve I/O, handling
* utility: provides macros and functions that do not involve I/O; it handles
control-flow, (p)lists, characters, strings, functions, classes, conditions,
"stamps" (real number or boolean for +/- infinity), versions, etc.
It also sports uiop-debug, a useful tool to help you debug programs.
* os: to extract information from your environment, including
an API identifier, unix vs windows, getenv, hostname, getcwd and chdir, etc.
* os: extracts information from your environment, including
an ABI identifier, features that distinguish Unix vs Windows,
getenv, hostname, getcwd and chdir, etc.
* pathname: to survive the gruesome non-portability trap that are CL pathnames
(and their lovecraftian "logical" variant), offering a vast array of functions
and a sensible, usable abstraction to specify relative pathnames.
* pathname: overcomes the gruesome non-portability trap that are CL pathnames
(and their lovecraftian "logical" variant), offering a vast array of
functions and a sensible, usable abstraction to specify relative pathnames.
It has a function merge-pathnames* to use instead of merge-pathnames, or
even better, subpathname and its variant subpathname*; it has also plenty
of functions for dealing with pathnames being directory vs file,
physical vs logical, absolute vs relative, and more.
* filesystem: to provide portable access to the filesystem, inspecting it,
* filesystem: provides portable access to the filesystem, inspecting it,
only using truename when desired, using native OS namestrings,
atomic file renaming, creating or deleting directories, etc.
* stream: to portably deal with character encodings (external formats),
element types, safe READing and WRITEing, opening files or temporary files,
providing FORMAT-like designators for streams, flushing output buffers,
consuming or copying streams, concatenating files, copying files, etc.
* stream: portably deals with *stderr* vs *error-output*, character encodings
(external formats), element types, safe READing and WRITEing, opening files
or temporary files, providing FORMAT-like designators for streams,
flushing output buffers, consuming or copying streams, concatenating streams
or files, copying files, etc.
* image: to portably deal with images, dumping them, restoring from them,
* image: portably deals with images, dumping them, restoring from them,
registering hooks to run at suitable events in the image lifetime,
printing backtraces, handling fatal conditions, using or avoiding debug modes,
accessing command line arguments or quitting the process.
* run-program: to portably spawn external processes and capture their output.
* run-program: portably spawns external processes and captures their output.
Can also capture error-output, inject input, or let it all be interactive.
* lisp-build: to portably compile common-lisp code, handle compilation results,
muffle uninteresting conditions, save and restore deferred warnings,
run hooks around compilation (to e.g. control optimizations or syntax),
identify the pathname of the current file, combine FASLs, etc.
* lisp-build: portably compiles common-lisp code, handles compilation results,
muffles uninteresting conditions, saves and restores deferred warnings,
runs hooks around compilation (to e.g. control optimizations or syntax),
identifies the pathname of the current file, combines FASLs, etc.
* configuration: to write portable configuration files, using best practices
to define and validate syntax, search standard paths,
* configuration: helps you define portable configuration files, using best
practices to define and validate syntax, search standard paths,
let users specify pathnames or pathname patterns, etc.
* backward-driver: to provide backward-compatibility with earlier incarnations
* backward-driver: provides backward-compatibility with earlier incarnations
of this library (i.e. ASDF internals that have leaked, or ASDF-UTILS)
* driver: to reexport all the above utilities in a single package UIOP.
* driver: reexports all the above utilities in a single package UIOP.
Documentation
......
......@@ -247,9 +247,9 @@ suitable for use as a directory name to segregate Lisp FASLs, C dynamic librarie
(defun getcwd ()
"Get the current working directory as per POSIX getcwd(3), as a pathname object"
(or #+abcl (symbol-call :asdf/filesystem :parse-native-namestring
(java:jstatic "getProperty" "java.lang.System" "user.dir")
:ensure-directory t)
(or #+abcl (truename (symbol-call :asdf/filesystem :parse-native-namestring
(java:jstatic "getProperty" "java.lang.System" "user.dir")
:ensure-directory t))
#+allegro (excl::current-directory)
#+clisp (ext:default-directory)
#+clozure (ccl:current-directory)
......
......@@ -627,7 +627,7 @@ Upon success, the KEEP form is evaluated and the file is is deleted unless it ev
(check-type pathname symbol)
(assert (or streamp pathnamep))
(let* ((afterp (position :close-stream body))
(before (if afterp (subseq body 0 (1- afterp)) body))
(before (if afterp (subseq body 0 afterp) body))
(after (when afterp (subseq body (1+ afterp))))
(beforef (gensym "BEFORE"))
(afterf (gensym "AFTER")))
......@@ -647,7 +647,7 @@ Upon success, the KEEP form is evaluated and the file is is deleted unless it ev
,@(when suffix `(:suffix ,suffix))
,@(when type `(:type ,type))
,@(when keep `(:keep ,keep))
,@(when after `(:after `#',afterf))
,@(when after `(:after #',afterf))
,@(when element-type `(:element-type ,element-type))
,@(when external-format `(:external-format ,external-format))))))
......
......@@ -67,7 +67,7 @@ previously-loaded version of ASDF."
;; "3.4.5.67" would be a development version in the official branch, on top of 3.4.5.
;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
(asdf-version "3.1.0.117")
(asdf-version "3.1.0.119")
(existing-version (asdf-version)))
(setf *asdf-version* asdf-version)
(when (and existing-version (not (equal asdf-version existing-version)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment