On 2009-07-20, at 21:10 , Robert Goldman wrote:
james anderson wrote:On 2009-05-18, at 14:55 , Nikodemus Siivola wrote:2009/5/18 Robert Goldman <rpgold...@sift.info>:Tobias C. Rittweiler wrote:I've read several times that it's a head ache to configure optionaldependencies with ASDF. How true is that? Could we perhaps provide another clause:OPTIONALLY-DEPEND-ON in DEFSYSTEM which would load a system only ifavailable?Doesn't :WEAKLY-DEPENDS-ON do what you want?there is at least one more kind of dependency between two components: "contingency".... Did this discussion ever go anywhere?James, would it be possible for you to resend this email with the tablesgiven as a text attachment, rather than as inline text? I don't know about the rest of the list, but my client (Thunderbird) turned your tables into complete and utter gibberish.
[i suspect it was because i neglected to disable line-wrapping before i sent the message.]
to summarize:in addition to simple and weak dependency, there is at least one more kind of dependency between two components: "contingency".
in order to manage a system for multiple runtimes, each of which entails it's own foreign libraries, i have found it useful to add a constraint called "contingent-on". this may-or-may-not be what you intend with "optionally-depend-on". i have found it useful to express the constraints:"if a feature|system 'X' is present, then system|component 'Y' is required, and depends on 'X'. if 'X' is not present, do nothing."
i attach an html file which describes, as a table, the relation between system model state and operations.
asdf-dependency-use-cases.html
Description: application/applefile
simple dependency intends this behaviour:
component status | effect | ||
---|---|---|---|
_expression_ | component a | component/feature b | |
a (:depends-on (:b)) | present | present | (operate b), (operate a) |
a (:depends-on (:b)) | present | absent | error |
a (:depends-on (:b)) | absent | present | error |
a (:depends-on (:b)) | absent | absent | error |
given the code in parse-component-form, :weakly-depends-on would appear to effect this behaviour:
component status | effect | ||
---|---|---|---|
_expression_ | component a | component/feature b | |
a (:weakly-depends-on (:b)) | present | present | (operate b), (operate a) |
a (:weakly-depends-on (:b)) | present | absent | (operate a) |
a (:weakly-depends-on (:b)) | absent | present | error |
a (:weakly-depends-on (:b)) | absent | absent | error |
there are cases, where it is useful to cause a third behaviour:
component status | effect | ||
---|---|---|---|
_expression_ | component a | component/feature b | |
a (:contingent-on (:b)) | present | present | (operate b), (operate a) |
a (:contingent-on (:b)) | present | absent | |
a (:contingent-on (:b)) | absent | present | error |
a (:contingent-on (:b)) | absent | absent | error |
perhaps there are others. this one is useful when building a system where the components are contingent on the runtime and/or o/s.
_______________________________________________ asdf-devel mailing list asdf-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel