[asdf-devel] Optional dependencies
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Fri Aug 20 14:36:24 UTC 2010
On Fri, Aug 20, 2010 at 1:07 PM, Tobias C Rittweiler <tcr at freebits.de>wrote:
> The parts you left out did not talk about reader conditionalization
> in ASD(F) files. So I'm confused by what you mean exactly.
Sorry, I understood the reader macros were intended to appear in the ASDF
itself. I obviously misread your email, but I needed a third reading to
grasp it all -- please tell me whether the following description is right
Library B has some facilities that make sense when library A is present. The
goal is to make these facilities compiled and loaded whenever possible.
1) Let the library B :weakly-depends-on A and use the fact that library A
introduces a new feature. The code in library B is then populated with #+/#-
depending on that feature.
2) One of the components in the system definition includes all the code that
depends on A and is loaded only when that :feature is active
3) One of the components in the system definition isolates all dependency on
A and this component :weakly-depends-on
4) Make two separate system definitions, one with and one without code for A
I believe 1 and 2 have problems because as you say the feature might be
present in the core. #3 is better because the code that depends on A is only
loaded when ASDF knows that A is present and loadable -- no dependency on
non-standard features. Method #3, if working (which Fare seems not to be
sure about) is also the substitute for reader macros in ASDF files.
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asdf-devel