On 1/23/10 Jan 23 -1:13 PM, Robert Brown wrote:
Thanks very much for the suggestions.
My example code was a simplification of a more complicated system definition, part of an project where I'm implementing Google's protocol buffers in Lisp.
http://github.com/brown/protobuf/blob/master/protobuf.asd
Protocol description files (suffix .proto) need to be converted into Lisp source, which is then compiled and loaded. I'm trying to get the dependencies right in one of my COMPONENT-DEPENDS-ON methods.
I may be able to help with this --- I have some examples of cases where I have written preprocessors that turn some outside languages into lisp through preprocessing.
Anyway, back to my simple example. When I use
(:cl-source-file "bug2" :depends-on ("bug1"))
the ASDF component for bug2 ends up with the following IN-ORDER-TO slot:
((ASDF:LOAD-OP (ASDF:LOAD-OP "bug1")) (ASDF:COMPILE-OP (ASDF:COMPILE-OP "bug1")))
I don't understand this. I believe it should be:
((ASDF:LOAD-OP (ASDF:LOAD-OP "bug1")) (ASDF:COMPILE-OP (ASDF:LOAD-OP "bug1")))
and in fact when do
# touch bug1.lisp (asdf:operate 'asdf:compile-op 'bug)
component bug1 is loaded (the source is compiled and then the fasl is loaded), not just compiled, before bug2 is compiled.
My goal is to understand what the ASDF operations mean. LOAD-OP means "compile and load my code".
I suppose. I like to think that it means "load my code" and that the dependency ensures that the file is compiled first.
I guess it depends on what you mean by "means" here --- how we attribute meaning to the operation itself and how we attribute meaning to its dependencies.
the core PERFORM method for load-op on a component loads the input files for load-op on that component. And the dependency means that the compiled fasl files are loaded.
The PERFORM method for compile-op just does a compile-file, no loading.
Have you tried looking at component-do-first as well as in-order-to?
If we can disentangle your confusion into something I can add to the manual, that would be great. I believe the object model that's in the manual right now is significantly more simple than what's in the code.
Your test case is a good one, too, since I don't believe the manual actually clearly specifies how to create a new operation or component class, which methods must be defined, etc. I have done this a couple of times but, because I'm a slob, I didn't take good enough notes on what I did.
Cheers, r