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 optional
dependencies with ASDF.

How true is that? Could we perhaps provide another clause
:OPTIONALLY-DEPEND-ON in DEFSYSTEM which would load a system only if
available?
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 tables
given 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.

Attachment: asdf-dependency-use-cases.html
Description: application/applefile

Title: asdf system dependency use cases

simple dependency intends this behaviour:

component statuseffect
_expression_component acomponent/feature b
a (:depends-on (:b))presentpresent(operate b), (operate a)
a (:depends-on (:b))presentabsenterror
a (:depends-on (:b))absentpresent error
a (:depends-on (:b))absentabsent error


given the code in parse-component-form, :weakly-depends-on would appear to effect this behaviour:

component statuseffect
_expression_component acomponent/feature b
a (:weakly-depends-on (:b))presentpresent (operate b), (operate a)
a (:weakly-depends-on (:b))presentabsent (operate a)
a (:weakly-depends-on (:b))absentpresent error
a (:weakly-depends-on (:b))absentabsent error


there are cases, where it is useful to cause a third behaviour:

component statuseffect
_expression_component acomponent/feature b
a (:contingent-on (:b))presentpresent (operate b), (operate a)
a (:contingent-on (:b))presentabsent
a (:contingent-on (:b))absentpresent error
a (:contingent-on (:b))absentabsent 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

Reply via email to