diff --git a/website/source/manual.mmd b/website/source/manual.mmd index 9ac929b19247a53229bf02acefcb6acc00907713..7f8bc51c1fab941fab6b2604e34718177626963b 100644 --- a/website/source/manual.mmd +++ b/website/source/manual.mmd @@ -156,6 +156,7 @@ before the component in question has been compiled."} | :operation-done-p method-form | :depends-on ( {dependency-def}* ) | :serial [ t | nil ] + | :weakly-depends-on ( {dependency-def}* ) | :in-order-to ( {dependency}+ ) component-list := ( {component-def}* ) @@ -200,6 +201,34 @@ is equivalent to (:file "b" :depends-on ("a")) (:file "c" :depends-on ("a" "b"))) +{anchor section-weakly-depends-on} + +#### Weakly-depends-on + +The `weakly-depends-on` argument says of the component +depended on "if this component can be found, then impose a +dependency, otherwise ignore it." At the top level, this can +be useful for allowing a system to take advantage of another +system, if it is present. For example, a system might +generate on-line documentation if a documentation generation +system (like [TINAA][tinaa-project], +[Albert][albert-project], etc.) was present. A system that +does text matching might do only simple matching but weakly +depend on a regular expression system and, if that system is +installed, would be able to also do regular expression +matching. + +##### Notes: + +* It's not entirely clear that this option is very + helpful at a level below the top-level. Since it uses + find-component, the behavior differs between top level and + lower level; perhaps that needs to be explained. + +* Presumably this will be most useful when complemented by + some conditional loading construct in the system that has + the dependency. What is that construct? + #### Source location The `:pathname` option is optional in all cases for systems @@ -258,6 +287,64 @@ Lisp in .asd files: can easily control the disposition of output from ASDF operations. +## System dependencies + +**Warning**: As of July 20, 2009, this aspect of ASDF is in flux. +We suggest not relying too heavily on the current syntax. + +There are several ways in which one system can depend on +another: + +* simple dependency (the default) +* `weak` dependency (using [`:weakly-depends-on`][weakly-depends-on]) +* `contingent` dependency (not currently implemented) + + [weakly-depends-on]: #section-weakly-depends-on + +The following tables illustrate how these dependencies work: + +#### Simple + +<table caption="Simple"> +<tr><th><th colspan="2">component status</th><th rowspan="2" valign="top">effect</th></tr> +<tr><th>expression</th><th>component a</th><th>component/feature b</th></tr> + +<tr><td>a (:depends-on (:b))</td><td style="text-align:center">present</td><td style="text-align:center">present</td><td>(operate b), (operate a)</td> +<tr><td>a (:depends-on (:b))</td><td style="text-align:center">present</td><td style="text-align:center">absent</td><td>error</td> +<tr><td>a (:depends-on (:b))</td><td style="text-align:center">absent</td><td style="text-align:center">present</td><td> error</td> +<tr><td>a (:depends-on (:b))</td><td style="text-align:center">absent</td><td style="text-align:center">absent</td><td> error</td></tr> +</table> +</p> + + +#### `:weakly-depends-on` + +<table> +<tr><th><th colspan="2">component status</th><th rowspan="2" valign="top">effect</th></tr> +<tr><th>expression</th><th>component a</th><th>component/feature b</th></tr> + +<tr><td>a (:weakly-depends-on (:b))</td><td style="text-align:center">present</td><td style="text-align:center">present</td><td> (operate b), (operate a)</td> +<tr><td>a (:weakly-depends-on (:b))</td><td style="text-align:center">present</td><td style="text-align:center">absent</td><td> (operate a)</td> +<tr><td>a (:weakly-depends-on (:b))</td><td style="text-align:center">absent</td><td style="text-align:center">present</td><td> error</td> +<tr><td>a (:weakly-depends-on (:b))</td><td style="text-align:center">absent</td><td style="text-align:center">absent</td><td> error</td></tr> +</table> +</p> + +#### Contingent + +<table> +<tr><th><th colspan="2">component status</th><th rowspan="2" valign="top">effect</th></tr> +<tr><th>expression</th><th>component a</th><th>component/feature b</th></tr> + +<tr><td>a (:contingent-on (:b))</td><td style="text-align:center">present</td><td style="text-align:center">present</td><td> (operate b), (operate a)</td> +<tr><td>a (:contingent-on (:b))</td><td style="text-align:center">present</td><td style="text-align:center">absent</td> +<tr><td>a (:contingent-on (:b))</td><td style="text-align:center">absent</td><td style="text-align:center">present</td><td> error</td> +<tr><td>a (:contingent-on (:b))</td><td style="text-align:center">absent</td><td style="text-align:center">absent</td><td> error</td></tr> +</table> +</p> +<hr /> + + ## The object model of ASDF ASDF is entirely object-oriented. Both a system's diff --git a/website/source/resources/shared-header.md b/website/source/resources/shared-header.md index 4d03b863110b0beb9f1a33cd6c6a59cf4dad8de8..8d993d678e6a938d7db2a544ae048dbe22411b9f 100644 --- a/website/source/resources/shared-header.md +++ b/website/source/resources/shared-header.md @@ -27,4 +27,8 @@ [kmp-large]: http://www.nhplace.com/kent/Papers/Large-Systems.html [hs-require]: http://www.lispworks.com/documentation/HyperSpec/Body/f_provid.htm#require - [hs-standard-output]: http://www.lispworks.com/documentation/HyperSpec/Body/v_debug_.htm#STstandard-outputST \ No newline at end of file + [hs-standard-output]: http://www.lispworks.com/documentation/HyperSpec/Body/v_debug_.htm#STstandard-outputST + + + [tinaa-project]: http://common-lisp.net/project/tinaa/ + [albert-project]: http://www.cliki.net/Albert/ \ No newline at end of file diff --git a/website/website.tmproj b/website/website.tmproj index 9f1b5d6d59a22298d156f3bd3d38c0798acd38b3..b54791d64adf278f5ce2d8431a93e8f8e011fba9 100644 --- a/website/website.tmproj +++ b/website/website.tmproj @@ -3,7 +3,7 @@ <plist version="1.0"> <dict> <key>currentDocument</key> - <string>source/index.mmd</string> + <string>source/manual.mmd</string> <key>documents</key> <array> <dict> @@ -16,15 +16,15 @@ <key>filename</key> <string>source/index.mmd</string> <key>lastUsed</key> - <date>2009-06-21T20:13:19Z</date> - <key>selected</key> - <true/> + <date>2009-07-18T14:05:17Z</date> </dict> <dict> <key>filename</key> <string>source/manual.mmd</string> <key>lastUsed</key> - <date>2009-06-21T19:56:37Z</date> + <date>2009-07-20T22:30:40Z</date> + <key>selected</key> + <true/> </dict> <dict> <key>filename</key> @@ -152,28 +152,44 @@ <key>caret</key> <dict> <key>column</key> - <integer>24</integer> + <integer>51</integer> <key>line</key> - <integer>7</integer> + <integer>39</integer> </dict> + <key>columnSelection</key> + <false/> <key>firstVisibleColumn</key> <integer>0</integer> <key>firstVisibleLine</key> - <integer>0</integer> + <integer>28</integer> + <key>selectFrom</key> + <dict> + <key>column</key> + <integer>63</integer> + <key>line</key> + <integer>39</integer> + </dict> + <key>selectTo</key> + <dict> + <key>column</key> + <integer>51</integer> + <key>line</key> + <integer>39</integer> + </dict> </dict> <key>source/manual.mmd</key> <dict> <key>caret</key> <dict> <key>column</key> - <integer>55</integer> + <integer>0</integer> <key>line</key> - <integer>948</integer> + <integer>348</integer> </dict> <key>firstVisibleColumn</key> <integer>0</integer> <key>firstVisibleLine</key> - <integer>978</integer> + <integer>322</integer> </dict> <key>source/resources/footer.md</key> <dict> @@ -222,14 +238,14 @@ <key>caret</key> <dict> <key>column</key> - <integer>8</integer> + <integer>47</integer> <key>line</key> - <integer>16</integer> + <integer>33</integer> </dict> <key>firstVisibleColumn</key> <integer>0</integer> <key>firstVisibleLine</key> - <integer>0</integer> + <integer>5</integer> </dict> <key>source/resources/ug-footer.md</key> <dict>