Commit 58588893 authored by Hugo Ishimaru's avatar Hugo Ishimaru
Browse files

Merge branch 'master' into ja

parents 8f569a65 23864f02
......@@ -93,7 +93,7 @@
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "3.3.3" ;; to be automatically updated by make bump-version
:version "3.3.3.3" ;; to be automatically updated by make bump-version
:depends-on ()
:components ((:module "build" :components ((:file "asdf"))))
. #-asdf3 () #+asdf3
......
......@@ -4,7 +4,7 @@
((test-names
:initarg :test-names
:reader test-names
:documentation "A list whose elments are either
:documentation "A list whose elements are either
cons cells of symbol and package designators or
simply a symbol designator.
In the latter case, the symbols will be interned
......
......@@ -65,7 +65,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@titlepage
@title ASDF: Another System Definition Facility
@subtitle Manual for Version 3.3.3
@subtitle Manual for Version 3.3.3.3
@c The following two commands start the copyright page.
@page
@vskip 0pt plus 1filll
......@@ -82,7 +82,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@node Top, Introduction, (dir), (dir)
@top ASDF: Another System Definition Facility
@ifnottex
Manual for Version 3.3.3
Manual for Version 3.3.3.3
@end ifnottex
......@@ -1003,8 +1003,6 @@ compiling, loading and testing.
@c FIXME: the following is too complicated for here, especially since
@c :force hasn't been defined yet. Move it. [2014/02/27:rpg]
@findex already-loaded-systems
@defun load-system system @Arest{} keys @Akey{} force force-not verbose version @AallowOtherKeys{}
Apply @code{operate} with the operation @code{load-op}, the
@var{system}, and any provided keyword arguments. Calling
......@@ -1080,6 +1078,13 @@ ASDF itself never builds anything unless
it's an explicitly requested system or the dependencies thereof).
@end defun
@defun already-loaded-systems
Returns a list of names of the systems that have been successfully
loaded so far.
@end defun
@node Moving on, , Convenience Functions, Using ASDF
@section Moving on
......@@ -1416,104 +1421,126 @@ Presumably, the 4th form looks like @code{(defparameter *foo-version* "5.6.7")}.
@findex defsystem
@cindex DEFSYSTEM grammar
@c FIXME: @var typesetting not consistently used here. We should either expand
@c its use to everywhere, or we should kill it everywhere.
@example
system-definition := ( defsystem system-designator @var{system-option}*)
system-designator := simple-component-name | complex-component-name
simple-component-name := lower-case string | symbol
NOTE: Underscores are not permitted. See below.
complex-component-name := string | symbol
See below.
system-option := :defsystem-depends-on system-list
| :weakly-depends-on @var{system-list}
| :class class-name # @pxref{System class names}
| :build-operation @var{operation-name}
| system-option
| module-option
| option
# These are only available since ASDF 3 (actually its alpha release 2.27)
system-option := :homepage string
| :bug-tracker string
| :mailto string
| :long-name string
| :source-control source-control
| :version version-specifier
| :entry-point object # @pxref{Entry point}
source-control := (keyword string)
module-option := :components component-list
| :serial [ t | nil ]
option :=
| :pathname pathname-specifier
| :default-component-class class-name
| :perform method-form
| :explain method-form
| :output-files method-form
| :operation-done-p method-form
| :if-feature feature-expression
| :depends-on ( @var{dependency-def}* )
| :in-order-to ( @var{dependency}+ )
system-list := ( @var{simple-component-name}* )
component-list := ( @var{component-def}* )
component-def := ( component-type simple-component-name @var{option}* )
component-type := :module | :file | :static-file | other-component-type
other-component-type := symbol-by-name
# @pxref{Component types}
# This is used in :depends-on, as opposed to ``dependency,''
# which is used in :in-order-to
dependency-def := simple-component-name
| ( :feature @var{feature-expression} dependency-def )
# @pxref{Feature dependencies}
| ( :version simple-component-name version-specifier )
| ( :require module-name )
# ``dependency'' is used in :in-order-to, as opposed to
# ``dependency-def''
dependency := (dependent-op @var{requirement}+)
requirement := (required-op @var{required-component}+)
dependent-op := operation-name
required-op := operation-name
simple-component-name := string
| symbol
pathname-specifier := pathname | string | symbol
NOTE: pathnames should be all lower case, and have no
underscores, although hyphens are permitted.
@macro defrule {NAME}
@anchor{rule-\NAME\}\NAME\ :=
@end macro
@ifhtml
@macro refrule {NAME}
@ref{rule-\NAME\,\NAME\}
@end macro
@end ifhtml
version-specifier := string
| (:read-file-form <pathname-specifier> <form-specifier>?)
| (:read-file-line <pathname-specifier> <line-specifier>?)
line-specifier := :at integer # base zero
form-specifier := :at [ integer | ( integer+ )]
@ifinfo
@macro refrule {NAME}
@ref{rule-\NAME\,\NAME\,\NAME\,\NAME\}
@end macro
@end ifinfo
method-form := (operation-name qual lambda-list @Arest{} body)
qual := method-qualifier?
method-qualifier = :before | :after | :around
@ifnothtml
@ifnotinfo
@macro refrule {NAME}
\NAME\
@end macro
@end ifnotinfo
@end ifnothtml
feature-expression := keyword
| (:and @var{feature-expression}*)
| (:or @var{feature-expression}*)
| (:not @var{feature-expression})
@example
@defrule{system-definition} ( defsystem @refrule{system-designator} @refrule{system-option}* )
@defrule{system-designator} @refrule{simple-component-name}
| @refrule{complex-component-name}
# NOTE: Underscores are not permitted.
# @pxref{Simple component names,Simple component names,Simple component names}
@defrule{simple-component-name} @var{lower-case string} | @var{symbol}
# @pxref{Complex component names,Complex component names,Complex component names}
@defrule{complex-component-name} @var{string} | @var{symbol}
@defrule{system-option} :defsystem-depends-on @refrule{system-list}
| :weakly-depends-on @refrule{system-list}
| :class @var{class-name} # @pxref{System class names}
| :build-pathname @refrule{pathname-specifier}
| :build-operation @refrule{operation-name}
| @refrule{system-option/asdf3}
| @refrule{module-option}
| @refrule{option}
# These are only available since ASDF 3 (actually its alpha release
# 2.27)
@defrule{system-option/asdf3} :homepage @var{string}
| :bug-tracker @var{string}
| :mailto @var{string}
| :long-name @var{string}
| :source-control @refrule{source-control}
| :version @refrule{version-specifier}
| :entry-point @var{object} # @pxref{Entry point}
@defrule{source-control} ( @var{keyword} @var{string} )
@defrule{module-option} :components @refrule{component-list}
| :serial [ t | nil ]
@defrule{option} :description @var{string}
| :long-description @var{string}
| :author @refrule{person-or-persons}
| :maintainer @refrule{person-or-persons}
| :pathname @refrule{pathname-specifier}
| :default-component-class @var{class-name}
| :perform @refrule{method-form}
| :explain @refrule{method-form}
| :output-files @refrule{method-form}
| :operation-done-p @refrule{method-form}
| :if-feature @refrule{feature-expression}
| :depends-on ( @refrule{dependency-def}* )
| :in-order-to ( @refrule{dependency}+ )
@defrule{person-or-persons} @var{string} | ( @var{string}+ )
@defrule{system-list} ( @refrule{simple-component-name}* )
@defrule{component-list} ( @refrule{component-def}* )
@defrule{component-def} ( @refrule{component-type} @refrule{simple-component-name} @refrule{option}* )
@defrule{component-type} :module | :file | :static-file | @refrule{other-component-type}
@defrule{other-component-type} symbol-by-name # @pxref{Component types}
# This is used in :depends-on, as opposed to "dependency", which is used
# in :in-order-to
@defrule{dependency-def} @refrule{simple-component-name}
| ( :feature @refrule{feature-expression} @refrule{dependency-def} ) # @pxref{Feature dependencies}
| ( :version @refrule{simple-component-name} @refrule{version-specifier} )
| ( :require @var{module-name} )
# "dependency" is used in :in-order-to, as opposed to "dependency-def"
@defrule{dependency} ( @refrule{dependent-op} @refrule{requirement}+ )
@defrule{requirement} ( @refrule{required-op} @var{required-component}+ )
@defrule{dependent-op} @refrule{operation-name}
@defrule{required-op} @refrule{operation-name}
# NOTE: pathnames should be all lower case, and have no underscores,
# although hyphens are permitted.
@defrule{pathname-specifier} @var{pathname} | @var{string} | @var{symbol}
@defrule{version-specifier} @var{string}
| ( :read-file-form @refrule{pathname-specifier} @refrule{form-specifier}? )
| ( :read-file-line @refrule{pathname-specifier} @refrule{line-specifier}? )
@defrule{line-specifier} :at @var{integer} # base zero
@defrule{form-specifier} :at [ @var{integer} | ( @var{integer}+ ) ]
@defrule{method-form} ( @refrule{operation-name} @refrule{qual} @var{lambda-list} @Arest{} @var{body} )
@defrule{qual} @refrule{method-qualifier}?
@defrule{method-qualifier} :before | :after | :around
@defrule{feature-expression} @var{keyword}
| ( :and @refrule{feature-expression}* )
| ( :or @refrule{feature-expression}* )
| ( :not @refrule{feature-expression} )
@defrule{operation-name} @var{symbol}
@end example
@subsection System designators
......@@ -1522,6 +1549,7 @@ System designators are either simple component names, or
complex (``slashy'') component names.
@subsection Simple component names (@code{simple-component-name})
@anchor{Simple component names}
Simple component names may be written as either strings or symbols.
......@@ -1546,6 +1574,7 @@ problems will @emph{definitely} occur for users who have configured ASDF
using logical pathnames.
@subsection Complex component names
@anchor{Complex component names}
A complex component name is a master name followed by a slash, followed
by a subsidiary name. This allows programmers to put multiple system
......
;;; -*- mode: Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; buffer-read-only: t; -*-
;;; This is ASDF 3.3.3: Another System Definition Facility.
;;; This is ASDF 3.3.3.3: Another System Definition Facility.
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
......
......@@ -75,6 +75,10 @@ the DEFPACKAGE-FORM uses it or imports a symbol from it."
(dolist (p arguments) (dep (string p))))
((:import-from :shadowing-import-from)
(dep (string (first arguments))))
#+sbcl
((:local-nicknames)
(loop* :for (local-nickname actual-package-name) :in arguments :do
(dep (string actual-package-name))))
((:nicknames :documentation :shadow :export :intern :unintern :recycle)))))
:from-end t :test 'equal))
......
......@@ -16,3 +16,9 @@
;; Test that primary system name returns the correct value when called with a
;; package-inferred-system object.
(assert-equal "package-inferred-system-test" (primary-system-name (find-system :package-inferred-system-test/a/x)))
;; Test that SBCL's :local-nicknames are recognized
#+sbcl
(progn
(load-system :package-inferred-system-test/local-nicknames-1)
(assert-equal "g" (symbol-call :package-inferred-system-test/local-nicknames-1 :f)))
(defpackage package-inferred-system-test/local-nicknames-1-dep
(:use :cl)
(:export #:g))
(in-package :package-inferred-system-test/local-nicknames-1-dep)
(defun g () "g")
(defpackage package-inferred-system-test/local-nicknames-1
(:use :cl)
(:local-nicknames
(:dep :package-inferred-system-test/local-nicknames-1-dep))
(:export #:f))
(in-package :package-inferred-system-test/local-nicknames-1)
(defun f () (dep:g))
;;; -*- Lisp -*-
(in-package :asdf-test)
;; the following should not be necessary, because of `frob-packages`
;; call, but somehow is. [2019/06/25:rpg]
(use-package :uiop :asdf-test)
(proclaim '(optimize (debug 3) (speed 1) (safety 3) (compilation-speed 0)))
(defun getcwd-from-run-program ()
......@@ -321,10 +324,36 @@
(directory-b (directory-files (subpathname *build-directory* "deleteme/a/b/"))))
(assert-pathnames-equal directory-a (list (subpathname *build-directory* "deleteme/a/1.x")))
(assert-pathnames-equal directory-b (list (subpathname *build-directory* "deleteme/a/b/2"))))
(DBG "check to make sure DIRECTORY-FILES checks its parameter for directory pathname")
(let ((directory-a-no-slash (directory-files (subpathname *build-directory* "deleteme/a")))
(directory-b-no-slash (directory-files (subpathname *build-directory* "deleteme/a/b"))))
(assert-pathnames-equal directory-a-no-slash (list (subpathname *build-directory* "deleteme/a/1.x")))
(assert-pathnames-equal directory-b-no-slash (list (subpathname *build-directory* "deleteme/a/b/2"))))
(DBG "check to make sure WITH-CURRENT-DIRECTORY checks its parameter for directory pathname")
(let ((directory-a-no-slash (subpathname *build-directory* "deleteme/a"))
(directory-b-no-slash (subpathname *build-directory* "deleteme/a/b")))
(assert (eq 'with-current-directory 'uiop:with-current-directory))
(with-current-directory (directory-a-no-slash)
(assert-pathnames-equal (directory-files (getcwd)) (list (subpathname *build-directory* "deleteme/a/1.x"))))
(with-current-directory (directory-b-no-slash)
(assert-pathnames-equal (directory-files (getcwd)) (list (subpathname *build-directory* "deleteme/a/b/2")))
(assert-pathnames-equal
(sort (subdirectories (getcwd)) #'string< :key #'(lambda (x) (car (last (pathname-directory x)))))
(list (subpathname *build-directory* "deleteme/a/b/c/")
(subpathname *build-directory* "deleteme/a/b/d/")
(subpathname *build-directory* "deleteme/a/b/e/")))))
(DBG "check to make sure SUBDIRECTORIES does list subdirectories")
(let ((directory-a (subdirectories (subpathname *build-directory* "deleteme/a/")))
(directory-b (subdirectories (subpathname *build-directory* "deleteme/a/b/"))))
(assert-pathnames-equal directory-a (list (subpathname *build-directory* "deleteme/a/b/")))
;; trailing slash should not be necessary...
(assert-pathnames-equal (subdirectories (subpathname *build-directory* "deleteme/a"))
(list (subpathname *build-directory* "deleteme/a/b/")))
(assert-pathnames-equal
(sort directory-b #'string< :key #'(lambda (x) (car (last (pathname-directory x)))))
(list (subpathname *build-directory* "deleteme/a/b/c/")
......
......@@ -209,7 +209,7 @@ Subdirectories should NOT be returned.
override the default at your own risk.
DIRECTORY-FILES tries NOT to resolve symlinks if the implementation permits this,
but the behavior in presence of symlinks is not portable. Use IOlib to handle such situations."
(let ((dir (pathname directory)))
(let ((dir (ensure-directory-pathname directory)))
(when (logical-pathname-p dir)
;; Because of the filtering we do below,
;; logical pathnames have restrictions on wild patterns.
......@@ -490,7 +490,10 @@ resolving them with respect to GETCWD if the DEFAULTS were relative"
"call the THUNK in a context where the current directory was changed to DIR, if not NIL.
Note that this operation is usually NOT thread-safe."
(if dir
(let* ((dir (resolve-symlinks* (get-pathname-defaults (pathname-directory-pathname dir))))
(let* ((dir (resolve-symlinks*
(get-pathname-defaults
(ensure-directory-pathname
dir))))
(cwd (getcwd))
(*default-pathname-defaults* dir))
(chdir dir)
......
......@@ -12,7 +12,7 @@
(in-package :uiop/version)
(with-upgradability ()
(defparameter *uiop-version* "3.3.3")
(defparameter *uiop-version* "3.3.3.3")
(defun unparse-version (version-list)
"From a parsed version (a list of natural numbers), compute the version string"
......
......@@ -94,7 +94,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.3.3")
(asdf-version "3.3.3.3")
(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