Problem with adding input files...

Faré fahree at gmail.com
Fri Jun 30 15:11:26 UTC 2017


On Fri, Jun 30, 2017 at 10:05 AM, Robert Goldman <rpgoldman at sift.net> wrote:
> Recording the included files (from read-file-form and read-file-line)
> has so far failed to solve the problem of ASDF missing updates to the
> included files.
>
First, can you confirm that the compute-action-stamp called by
mark-operation-done called by the perform :after method on define-op
returns the correct value?

I suspect it may fail to take into account the input files, because
you compute the input-files too early and the value without your
addition gets cached.

If you didn't change the perform define-op method to call
system-source-file directly instead of input-files, that might be the
issue. And/or if your input-files fails to consult a slot from the
system object that persists across sessions. Of course, you need to
invalidate that slot if and when you invalidate the .asd file itself.

> I could use a little advice here.  Running the test I have pushed, I
> tried tracing asdf/action:action-up-to-date-p.  It is not called during
> the second invocation of (asdf:load-system "test-include")
>
I admit the asdf model has fallen out of my cache and I can't even
rebuild the context in which this trace would (or wouldn't) make
sense.

> So at the moment I do not see how the flow of control works to decide
> whether or not it is necessary to redo the DEFINE-OP.
>
My understanding is that the first time over, of course you do it, and
the second time over, traverse-action calls compute-action-status that
calls compute-action-stamp, and that decides (using notably
input-files) whether the action is up to date.

> And maybe DEFINE-OP isn't the operation that should be re-triggered by
> changes to the system definition file or included files?  Is the right
> place for these new dependencies on included files DEFINE-OP or PREPARE-OP?
>
I'm pretty sure it's DEFINE-OP and not PREPARE-OP.

Thanks a lot for getting into the code. The code definitely needs more
people looking into it. Also, if you find that my comments are
insufficient or incorrect, they should be fixed.

I did a "code walkthrough" a few years back, but obviously it doesn't
cover the new DEFINE-OP infrastructure.

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Reality must take precedence over public relations,
for Mother Nature cannot be fooled.
                — R.P. Feynman



More information about the asdf-devel mailing list