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.