On Fri, Aug 6, 2010 at 1:24 AM, Stelian Ionescu <sionescu@cddr.org> wrote:
Try something like this:

(defmethod asdf:perform ((op asdf:compile-op) (c protobuf-source-file))
 (let* ((output-defaults (pathname (car (asdf:output-files op c))))
        (generated-source-file (make-pathname :name (pathname-name (asdf:component-pathname c))
                                              :type "lisp"
                                              :defaults output-defaults)))
   ))

You need to call OUTPUT-FILES which will apply the output translations you've configured

Your suggestion does work, but it's a bit mysterious.  Note that you didn't
redefine INPUT-FILES for components of type PROTOBUF-SOURCE-FILE
and the suggestion involves copying PERFORM code from asdf.lisp into my
protobuf.asd file.

Also, your change appears to just affect compilation, but due to ASDF's
handling of so called "self dependencies" (at least I think this is the cause)
your change also magically makes LOAD-OP function correctly.

I agree with Robert Goldman that it would be nice to pin down the semantics
of INPUT-FILES and OUTPUT-FILES.  Maybe the self-dependency code
can be eliminated or made more general.  Right now I think it's a special
case just used to make LOAD-OP capable of doing two things,
compiling and then loading the compiled products.

In any case, thanks for the suggestion.  It does indeed solve my problem.

bob