[asdf-devel] load order of dependencies

Faré fahree at gmail.com
Thu Nov 24 15:12:14 UTC 2011


Dear Attila,

I'm not sure what you want exactly, but it smells like what you really need is

(defsystem hu.dwim.reiterate-test
  :defsystem-depends-on (:hu.dwim.asdf :hu.dwim.logger)
  :class :hu.dwim.system
  :depends-on (:hu.dwim.reiterate)
  ...)

So did you find a Lisp job in .kz ?

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
So that there be reality, there must be an observer.
"I am, therefore someone thinks."       — Faré



On Thu, Nov 24, 2011 at 04:14, Attila Lendvai <attila.lendvai at gmail.com> wrote:
> dear list,
>
> my use-case: i want to make sure that when a system is loaded
> (compiled) due to its test suite being invoked, then a full-blown
> optional dependency be loaded first, and only then the system itself
> (which checks for #+(cl:find-package :foo) at compile time).
>
> to be more specific, it's about whether to load or not a full logging
> library with heavy dependencies. when the test suite is invoked, then
> debugging will most probably follow, so load logging first that
> affects the compilation of the system itself.
>
> and to be even more specific, we have a custom develop-op, that does
> all kind of things, including the seeking and loading of all the
> optional swank integration systems we have, etc. (note: i was doing
> the experiments below using plain 'asdf:load-system invoked on
> :hu.dwim.reiterate+hu.dwim.logger, and AFAICS there are no
> customizations that should interfere, but hit me on the head with the
> ASDF manual if you believe otherwise, and i should go back and try to
> synthesize a stripped down test case.)
>
> this is how i wanted to achieve it:
>
> CL-USER> (asdf:asdf-version)
> "2.017"
>
>
> try #1 (in any order, reiterate is compiled before the logger):
>
> :in-order-to ((load-op (load-op :hu.dwim.logger :hu.dwim.reiterate))
>                (compile-op (compile-op :hu.dwim.logger :hu.dwim.reiterate)))
>
> without any :depends-on entry, which as far as i understand compiles
> into :in-order-to entries.
>
>
> try #2 (the before methods seem to get invoked too late when logger
> has fasls and reiterate doesn't?! but seems to work when neither have
> fasls?!):
>
> (defsystem :hu.dwim.reiterate+hu.dwim.logger
>  :class hu.dwim.system
>  :description "Loads hu.dwim.logger first, so that proper logging is
> available when developing, but not making the extra dependency
> mandatory."
>  :depends-on (:hu.dwim.reiterate
>               :hu.dwim.logger))
>
> (defmethod perform :before ((op operation) (system (eql (find-system
> :hu.dwim.reiterate+hu.dwim.logger))))
>  (load-system :hu.dwim.logger))
>
> (defmethod perform :before ((op operation) (system (eql (find-system
> :hu.dwim.reiterate))))
>  (load-system :hu.dwim.logger))
>
> (defmethod perform :before ((op operation) (system (eql (find-system
> :hu.dwim.reiterate.test))))
>  (load-system :hu.dwim.logger))
>
>
> but to the point: what's the contract regarding the load/compile order
> of dependencies? and if there's any, then how can i tell ASDF to load
> hu.dwim.logger first? (i couldn't find anything in the manual, but i
> welcome a "try again in chapter 6", because asdf sources are not too
> easy on my parser...)
>
> and if the order is not specified in the ASDF contract, then can we
> apply a randomizer to the otherwise equal dependencies? i've seen it
> many times before that unrecorded dependencies showed up as filesystem
> order changed (or something else, it's just an assumption, but the
> missing dependency often materialized when deploying the system on a
> different machine).
>
> --
>  attila
>
> Notice the erosion of your (digital) freedom, and do something about it!
>
> PGP: 2FA1 A9DC 9C1E BA25 A59C  963F 5D5F 45C7 DFCD 0A39
> OTR XMPP: 8647EEAC EA30FEEF E1B55146 573E52EE 21B1FF06
>
> _______________________________________________
> asdf-devel mailing list
> asdf-devel at common-lisp.net
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel
>




More information about the asdf-devel mailing list