<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body><div style="font-family: sans-serif;"><div class="markdown" style="white-space: normal;">
<p dir="auto">On 27 Apr 2022, at 10:26, Robert Goldman wrote:</p>
</div><div class="plaintext" style="white-space: normal;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"><p dir="auto">Phoebe Goldman writes (but can't post):</p>
<br></blockquote><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; border-left-color: #999999; color: #999999;"><p dir="auto">I'm following the manual: "If the action of performing the operation on a component has
<br>
dependencies, you must define a method on component-depends-on."</p>
</blockquote><p dir="auto">This is wrong; I don't know why the manual says that. You still can define a method on COMPONENT-DEPENDS-ON, but there's no reason to unless you have a really weird operation. Writing your own COMPONENT-DEPENDS-ON methods is error-prone and a pain in the ass, so it's much easier to subclass one of the direction-DEPENDS-ON methods and get a built-in method that does the right thing.</p>
</blockquote></div>
<div class="markdown" style="white-space: normal;">
<p dir="auto">I will fix the manual RN.</p>
</div><div class="plaintext" style="white-space: normal;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; border-left-color: #999999; color: #999999;"><p dir="auto">But still I don't get why echo-op depends on itself. I didn't specify it
<br>
anyway. Or it that the default behaviour for all *-operation classes?</p>
</blockquote><p dir="auto">Honestly, I have no clue why there's an (ECHO-OP . NIL) pair at the head of the COMPONENT-DEPENDS-ON list for an ECHO-OP. But MAP-DIRECT-DEPENDENCIES ignores it. Shrug.</p>
<blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; border-left-color: #999999; color: #999999;"><p dir="auto">"A method for [INPUT-FILES] is often not needed, since ASDF has a pretty
<br>
clever default input-files mechanism."</p>
</blockquote></blockquote><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"><p dir="auto">Again, I don't know why the manual says that. You don't need to define INPUT-FILES methods for built-in operations, but you will need to define them for custom operations that take files as input. Most user-defined operations subclass either COMPILE-OP or LOAD-OP, which already have their INPUT-FILES (and OUTPUT-FILES) methods, but I've had to define INPUT-FILES methods in the past.</p>
</blockquote></div>
<div class="markdown" style="white-space: normal;">
<p dir="auto">I will update that, too. TBH, I'm not sure that this is up-to-date with Fare's refactoring that introduced the <code style="margin: 0 0; padding: 0 0.25em; border-radius: 3px; background-color: #F7F7F7;">additional-input-files</code> generic function, but I don't have enough time today to dig into this burger.</p>
</div><div class="plaintext" style="white-space: normal;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; border-left-color: #999999; color: #999999;"><p dir="auto">Is there a way to obtain the pathname to (:FILE "foo") from the
<br>
CL-SOURCE-FILE object like what COMPILE-OP does?</p>
</blockquote><p dir="auto">COMPONENT-PATHNAME.</p>
<blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; border-left-color: #999999; color: #999999;"><p dir="auto">Why do I get nothing for my input-files? I'm expecting it to print out
<br>
the pathname to (:FILE "foo") object, very much like the input files
<br>
into COMPILE-OP.</p>
</blockquote><p dir="auto">Taking the COMPONENT-PATHNAME as the sole INPUT-FILE can't be the default, because lots of operations do something different. If you think of PREPARE-OP, COMPILE-OP and LOAD-OP as being the "normal" operations on a LISP-SOURCE-FILE, only COMPILE-OP takes the source file as an INPUT-FILE. LOAD-OP takes as an INPUT-FILE the compiled fasl, which is the OUTPUT-FILES of COMPILE-OP. I don't think PREPARE-OP takes any INPUT-FILES at all, but I could be wrong.</p>
</blockquote></div>
<div class="markdown" style="white-space: normal;">
<p dir="auto">According to the docs, most operations inherit from <code style="margin: 0 0; padding: 0 0.25em; border-radius: 3px; background-color: #F7F7F7;">self ward-operation</code>, which would take the component-pathname as an input file (and might take others).</p>
<p dir="auto">If this is wrong, please let me know and I will adjust the documentation.</p>
<p dir="auto">Getting more of this discussion into the manual would be great, since there's lots of good guidance here.</p>
</div>
</div>
</body>
</html>