Skip to content
Snippets Groups Projects
Commit eb13c171 authored by Peter Van Eynde's avatar Peter Van Eynde
Browse files

Merge branch 'upstream'

parents 59475faf 45144c11
No related branches found
No related tags found
No related merge requests found
......@@ -109,6 +109,9 @@
#:*resolve-symlinks*
#:operation-error #:compile-failed #:compile-warned #:compile-error
#:error-name
#:error-pathname
#:missing-definition
#:error-component #:error-operation
#:system-definition-error
#:missing-component
......@@ -163,7 +166,7 @@
;;;;
(defparameter *asdf-revision*
;; the 1+ hair is to ensure that we don't do an inadvertent find and replace
(subseq "REVISION:1.374" (1+ (length "REVISION"))))
(subseq "REVISION:1.375" (1+ (length "REVISION"))))
(defvar *resolve-symlinks* t
"Determine whether or not ASDF resolves symlinks when defining systems.
......@@ -421,6 +424,14 @@ and NIL NAME and TYPE components"
(:report (lambda (c s)
(apply #'format s (format-control c) (format-arguments c)))))
(define-condition missing-definition (system-definition-error)
((name :initarg :name :reader error-name)
(pathname :initarg :pathname :reader error-pathname))
(:report (lambda (c s)
(format s "~@<Definition search function returned a wrong pathname ~A ~
in search of a definition for system ~A.~@:>"
(error-pathname c) (error-name c)))))
(define-condition circular-dependency (system-definition-error)
((components :initarg :components :reader circular-dependency-components)))
......@@ -746,14 +757,17 @@ to `~a` which is not a directory.~@:>"
(< (car in-memory) (safe-file-write-date on-disk))))
(let ((package (make-temporary-package)))
(unwind-protect
(let ((*package* package))
(asdf-message
"~&~@<; ~@;loading system definition from ~A into ~A~@:>~%"
;; FIXME: This wants to be (ENOUGH-NAMESTRING
;; ON-DISK), but CMUCL barfs on that.
on-disk
*package*)
(load on-disk))
(with-open-file (asd on-disk :if-does-not-exist nil)
(if asd
(let ((*package* package))
(asdf-message
"~&~@<; ~@;loading system definition from ~A into ~A~@:>~%"
;; FIXME: This wants to be (ENOUGH-NAMESTRING
;; ON-DISK), but CMUCL barfs on that.
on-disk
*package*)
(load asd))
(error 'missing-definition :name name :pathname on-disk)))
(delete-package package))))
(let ((in-memory (system-registered-p name)))
(if in-memory
......
......@@ -74,6 +74,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* Compilation error and warning handling::
* Miscellaneous additional functionality::
* Getting the latest version::
* FAQ::
* TODO list::
* missing bits in implementation::
* Inspiration::
......@@ -610,7 +611,7 @@ is a nice thing to specialise operation methods on and easier than
having them all be EQL methods.
Operations are invoked on systems via @code{operate}.
@anchor{operate}
@deffn {Generic function} operate operation system &rest initargs
@deffnx {Generic function} oos operation system &rest initargs
@code{operate} invokes @var{operation} on @var{system}. @code{oos}
......@@ -678,6 +679,7 @@ If you are creating a component type, you need to implement this
operation - at least, where meaningful.
@end deffn
@anchor{test-op}
@deffn Operation test-op
This operation will perform some tests on the module. The default
......@@ -1276,7 +1278,7 @@ location of the system's source file and the relative pathname. For example
@end enumerate
@node Getting the latest version, TODO list, Miscellaneous additional functionality, Top
@node Getting the latest version, FAQ, Miscellaneous additional functionality, Top
@comment node-name, next, previous, up
@chapter Getting the latest version
......@@ -1296,8 +1298,108 @@ You will find the above referenced tags in this repository.
Discussion of ASDF development is conducted on the mailing list
@kbd{asdf-devel@@common-lisp.net}.
@node TODO list, missing bits in implementation, Getting the latest version, Top
@node FAQ, TODO list, missing bits in implementation, Getting the latest version, Top
@comment node-name, next, previous, up
@chapter FAQ
@itemize
@item ``My Common Lisp implementation comes with an outdated version of ASDF. What to do?''
More up-to-date versions of ASDF are distributed with an @file{asdf.asd}
file, and @emph{should} load cleanly on top of older versions. So you
should be able to load this definition file (or add its pathname to your
@code{asdf:*central-registry*} variable), and then do:
@example
(asdf:oos 'asdf:load-op :asdf)
@end example
If this does not work, it is a bug, and you should report it
(@pxref{FAQ, report-bugs, Where do I report a bug}).
@item ``How can I cater for unit-testing in my system?''
ASDF provides a predefined test operation, @code{test-op}.
@xref{Predefined operations of asdf, test-op}.
The test operation, however, is largely left to the system definer to specify.
@code{test-op} has been
a topic of considerable discussion on the asdf-devel mailing list, and
on the launchpad bug-tracker.
Here are some guidelines:
@itemize
@item
For a given system, @var{foo}, you will want to define a corresponding
test system, such as @var{foo-test}. The reason that you will want this
separate system is that ASDF does not out of the box supply components
that are conditionally loaded. So if you want to have source files
(with the test definitions) that will not be loaded except when testing,
they should be put elsewhere.
@item
The @var{foo-test} system can be defined in an asd file of its own or
together with @var{foo}. An aesthetic preference against cluttering up
the filesystem with extra asd files should be balanced against the
question of whether one might want to directly load @var{foo-test}.
Typically one would not want to do this except in early stages of
debugging.
@item
Record that testing is implemented by @var{foo-test}. For example:
@example
(defsystem @var{foo}
:in-order-to ((test-op (test-op @var{foo-test})))
....)
(defsystem @var{foo-test}
:depends-on (@var{foo} @var{my-test-library} ...)
....)
@end example
@end itemize
This procedure will allow you to support users who do not wish to
install your test framework.
One oddity of ASDF is that @code{operate} (@pxref{Operations,operate})
does not return a value. So in current versions of ASDF there is no
reliable programmatic means of determining whether or not a set of tests
has passed, or which tests have failed. The user must simply read the
console output. This limitation has been the subject of much
discussion.
item ``How can I cater for documentation generation in my system?''
The ASDF developers are currently working to add a @code{doc-op} to the
set of predefined ASDF operations (@pxref{Predefined operations of
asdf}). See also @url{https://bugs.launchpad.net/asdf/+bug/479470}.
@item ``How can I customize where fasl files are stored?''
@xref{Controlling where ASDF saves compiled files}.
Note that in the past there was an add-on to ASDF called
ASDF-binary-locations, developed by Gary King. That add-on has been
merged into ASDF proper.
Note that use of asdf-binary-locations can interfere with one aspect of
your systems --- if your system uses @code{*load-truename*} to find
files (e.g., if you have some data files stored with your program), then
the relocation that this ASDF customization performs is likely to
interfere.
@item ``How can I maintain non-Lisp (e.g. C) source files?''
@anchor{report-bugs}
@item Where do I report a bug?
ASDF bugs are tracked on launchpad: @url{https://launchpad.net/asdf}.
@end itemize
@node TODO list, missing bits in implementation, FAQ, Top
comment node-name, next, previous, up
@chapter TODO list
* Outstanding spec questions, things to add
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment