Re: ASDF: module and system level dependencies don't work right?

Todd Sabin <[email protected]>
Newsgroups gmane.lisp.cclan.general
Message-ID <[email protected]>
Gary King <[email protected]> writes:

>> I'm afraid I don't quite understand what you mean by dependencies
>> flowing.  Dependencies don't exist (as far as ASDF knows) unless
>> you've specified them with :depends-on, right?  If you don't want your
>> modules to depend on each other, you just don't say that they do.  So
>> I guess I've misunderstood you?
>
> Oh, I'm probably just being incoherent again. <smile>
>
> I agree that dependencies only exist if you specify them. Once
> specified, they flow. So I think we're on the same page there.
>
> The discussion below isn't quite right and I've got to get the kids
> to school (!) but I think there is grist here. There are (at least)
> two kinds of dependencies:
>
> 1. This "thing" won't compile correctly unless this other "thing" is
> already compiled/loaded
> 2. This "thing" won't run unless this other thing is already compiled/
> loaded.
>
> An example of the first is a macro definition or a defvar/
> defparameter. An example of the second is a regular function.
>
> Currently, ASDF conflates these two dependencies and treats them
> differently. The (:file X :depends-on Y) is an example of the first
> kind; it says "recompile X if anything in Y changes". The
> dependencies between modules are like the second kind; it says that
> "before you load X, load Y" but doesn't do any reasoning about dates.
>
> Perhaps all of this can be made more explicit.

I agree with your description of how things currently work, but not
that they should work that way.  :)

First, if you want the second kind of dependency you mention, I think
you can already get that by saying

 :module b
 :in-order-to (compile-op (load-op "a"))

or something like that.  However, there doesn't seem to be any way to
get the first kind of dependency at the level of modules, if the
current behavior is considered correct.

Second, having :depends-on mean different things at different levels
is just very confusing, and prevents what seems to be the natural
evolution of a system.  For me, a typical system starts out with a
package.lisp, and another file.  Over time, more files are added, with
dependencies specified.  At some point, it becomes obvious that most
or all of the new files depend on some base set of files.  At that
point, the obvious (to me) thing to do is put those files in a 'base'
module, the other files in a second module, and specify the dependency
at the module level.

> P.S. Does anyone know why I receive at least two and sometimes more
> messages for every message sent to this list and/or where to look to
> fix it!! Thanks.

It may be because you're explicitly in the To: or Cc: list, as well as
subscribed to the mailing list.  Check the message headers and see if
they all have the typical mailing list stuff or not.  You can specify
that you don't want extra copies of messages sent to lists by using
the Mail-Copies-To: header in your outgoing messages, but not all mail
clients respect that.

-- 
Todd Sabin                                          <[email protected]>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.