Skip to content
Snippets Groups Projects
Commit 7177edaf authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Improve configuration DSL documentation based on feedback from Xach.

Clean up a test script.
parent 80477bdb
No related branches found
No related tags found
No related merge requests found
...@@ -338,19 +338,19 @@ If you're using some tool to install software, ...@@ -338,19 +338,19 @@ If you're using some tool to install software,
the authors of that tool should already have configured ASDF. the authors of that tool should already have configured ASDF.
The simplest way to add a path to your search path, The simplest way to add a path to your search path,
say @file{/foo/bar/baz/quux/} say @file{/home/luser/.asd-link-farm/}
is to create the directory is to create the directory
@file{~/.config/common-lisp/source-registry.conf.d/} @file{~/.config/common-lisp/source-registry.conf.d/}
and there create a file with any name of your choice but the type @file{conf}, and there create a file with any name of your choice but the type @file{conf},
for instance @file{42-bazquux.conf} for instance @file{42-asd-link-farm.conf}
containing the line: containing the line:
@kbd{(:directory "/foo/bar/baz/quux/")} @kbd{(:directory "/home/luser/.asd-link-farm/")}
If you want all the subdirectories under @file{/foo/bar/baz/} If you want all the subdirectories under @file{/home/luser/lisp/}
to be recursively scanned for @file{.asd} files, instead use: to be recursively scanned for @file{.asd} files, instead use:
@kbd{(:tree "/foo/bar/baz/quux/")} @kbd{(:tree "/home/luser/lisp/")}
Note that your Operating System distribution or your system administrator Note that your Operating System distribution or your system administrator
may already have configured system-managed libraries for you. may already have configured system-managed libraries for you.
...@@ -894,8 +894,9 @@ be forced upon you if you were specifying a string. ...@@ -894,8 +894,9 @@ be forced upon you if you were specifying a string.
@subsection Warning about logical pathnames @subsection Warning about logical pathnames
@cindex logical pathnames @cindex logical pathnames
We recommend that you no use logical pathnames in your asdf system We recommend that you not use logical pathnames
definitions, but logical pathnames @emph{are} supported. in your asdf system definitions at this point,
but logical pathnames @emph{are} supported.
To use logical pathnames, To use logical pathnames,
you will have to provide a pathname object as a @code{:pathname} specifier you will have to provide a pathname object as a @code{:pathname} specifier
...@@ -919,8 +920,9 @@ system that uses logical pathnames will be have differently under ...@@ -919,8 +920,9 @@ system that uses logical pathnames will be have differently under
asdf-output-translations than other systems you use. asdf-output-translations than other systems you use.
If you wish to use logical pathnames you will have to configure the If you wish to use logical pathnames you will have to configure the
translations yourself before they may be used. ASDF provides no translations yourself before they may be used.
specific support for defining logical pathname translations. ASDF currently provides no specific support
for defining logical pathname translations.
@subsection Serial dependencies @subsection Serial dependencies
...@@ -932,8 +934,8 @@ on all the children textually preceding it. ...@@ -932,8 +934,8 @@ on all the children textually preceding it.
This is done as if by @code{:depends-on}. This is done as if by @code{:depends-on}.
@lisp @lisp
:components ((:file "a") (:file "b") (:file "c"))
:serial t :serial t
:components ((:file "a") (:file "b") (:file "c"))
@end lisp @end lisp
is equivalent to is equivalent to
...@@ -1732,6 +1734,12 @@ CONFIGURATION := (:source-registry DIRECTIVE ...) ...@@ -1732,6 +1734,12 @@ CONFIGURATION := (:source-registry DIRECTIVE ...)
;; A directive is one of the following: ;; A directive is one of the following:
DIRECTIVE := DIRECTIVE :=
;; INHERITANCE DIRECTIVE:
;; Your configuration expression MUST contain
;; exactly one of either of these:
:inherit-configuration | ; splices inherited configuration (often specified last)
:ignore-inherited-configuration | ; drop inherited configuration (specified anywhere)
;; add a single directory to be scanned (no recursion) ;; add a single directory to be scanned (no recursion)
(:directory DIRECTORY-PATHNAME-DESIGNATOR) | (:directory DIRECTORY-PATHNAME-DESIGNATOR) |
...@@ -1746,11 +1754,6 @@ DIRECTIVE := ...@@ -1746,11 +1754,6 @@ DIRECTIVE :=
;; splice the parsed contents of another config file ;; splice the parsed contents of another config file
(:include REGULAR-FILE-PATHNAME-DESIGNATOR) | (:include REGULAR-FILE-PATHNAME-DESIGNATOR) |
;; Your configuration expression MUST contain
;; exactly one of either of these:
:inherit-configuration | ; splices contents of inherited configuration
:ignore-inherited-configuration | ; drop contents of inherited configuration
;; This directive specifies that some default must be spliced. ;; This directive specifies that some default must be spliced.
:default-registry :default-registry
...@@ -1759,6 +1762,15 @@ PATTERN := a string without wildcards, that will be matched exactly ...@@ -1759,6 +1762,15 @@ PATTERN := a string without wildcards, that will be matched exactly
of a path. e.g. @code{"_darcs"} will match @file{#p"/foo/bar/_darcs/src/bar.asd"} of a path. e.g. @code{"_darcs"} will match @file{#p"/foo/bar/_darcs/src/bar.asd"}
@end example @end example
For instance, as a simple case, my @file{~/.config/common-lisp/source-registry.conf},
which is the default place ASDF looks for this configuration,
once contained:
@example
(:source-registry
(:tree "/home/fare/cl/")
:inherit-configuration)
@end example
@section Configuration Directories @section Configuration Directories
...@@ -1767,7 +1779,7 @@ a list of directives without any enclosing @code{(:source-registry ...)} form. ...@@ -1767,7 +1779,7 @@ a list of directives without any enclosing @code{(:source-registry ...)} form.
The files will be sorted by namestring as if by @code{string<} and The files will be sorted by namestring as if by @code{string<} and
the lists of directives of these files with be concatenated in order. the lists of directives of these files with be concatenated in order.
An implicit @code{:inherit-configuration} will be included An implicit @code{:inherit-configuration} will be included
at the end of the list. at the @emph{end} of the list.
This allows for packaging software that has file granularity This allows for packaging software that has file granularity
(e.g. Debian's @code{dpkg} or some future version of @code{clbuild}) (e.g. Debian's @code{dpkg} or some future version of @code{clbuild})
...@@ -1787,6 +1799,15 @@ or namestring in an @code{:include} directive, e.g.: ...@@ -1787,6 +1799,15 @@ or namestring in an @code{:include} directive, e.g.:
(:include "/foo/bar/") (:include "/foo/bar/")
@end example @end example
Hence, to achieve the same effect as
my example @file{~/.config/common-lisp/source-registry.conf} above,
I could simply create a file
@file{~/.config/common-lisp/source-registry.conf.d/33-home-fare-cl.conf}
alone in its directory with the following contents:
@example
(:tree "/home/fare/cl/")
@end example
@section Shell-friendly syntax for configuration @section Shell-friendly syntax for configuration
...@@ -2136,13 +2157,14 @@ CONFIGURATION := (:output-translations DIRECTIVE ...) ...@@ -2136,13 +2157,14 @@ CONFIGURATION := (:output-translations DIRECTIVE ...)
;; A directive is one of the following: ;; A directive is one of the following:
DIRECTIVE := DIRECTIVE :=
;; include a configuration file or directory ;; INHERITANCE DIRECTIVE:
(:include PATHNAME-DESIGNATOR) |
;; Your configuration expression MUST contain ;; Your configuration expression MUST contain
;; exactly one of either of these: ;; exactly one of either of these:
:inherit-configuration | ; splices contents of inherited configuration :inherit-configuration | ; splices inherited configuration (often specified last)
:ignore-inherited-configuration | ; drop contents of inherited configuration :ignore-inherited-configuration | ; drop inherited configuration (specified anywhere)
;; include a configuration file or directory
(:include PATHNAME-DESIGNATOR) |
;; enable global cache in ~/.common-lisp/cache/sbcl-1.0.35-x86-64/ or something. ;; enable global cache in ~/.common-lisp/cache/sbcl-1.0.35-x86-64/ or something.
:enable-user-cache | :enable-user-cache |
...@@ -2258,7 +2280,7 @@ a list of directives without any enclosing ...@@ -2258,7 +2280,7 @@ a list of directives without any enclosing
The files will be sorted by namestring as if by @code{string<} and The files will be sorted by namestring as if by @code{string<} and
the lists of directives of these files with be concatenated in order. the lists of directives of these files with be concatenated in order.
An implicit @code{:inherit-configuration} will be included An implicit @code{:inherit-configuration} will be included
at the end of the list. at the @emph{end} of the list.
This allows for packaging software that has file granularity This allows for packaging software that has file granularity
(e.g. Debian's @command{dpkg} or some future version of @command{clbuild}) (e.g. Debian's @command{dpkg} or some future version of @command{clbuild})
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
;; now remove one output file and check that the other is _not_ recompiled ;; now remove one output file and check that the other is _not_ recompiled
;;(trace asdf::operation-done-p asdf::traverse)
(asdf::run-shell-command "rm -f ~A" (namestring file2)) (asdf::run-shell-command "rm -f ~A" (namestring file2))
(asdf:operate 'asdf:load-op 'test1) (asdf:operate 'asdf:load-op 'test1)
(assert (= file1-date (file-write-date file1))) (assert (= file1-date (file-write-date file1)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment