IIRC, at ITA we loaded all the source code of QPX as source code in a
first pass before we compiled it, to get all the functions resolved
(happily, there weren't any macro-defining macros requiring more than
one level of such loading), due to the code having been defined
without such a clean build in mind. I don't remember for sure, but I
suspect we did that also when we used ADG on that code-base to detect
the dependencies. Maybe we even ran ADG twice? In the end, we also
generated fine-grained dependency reports so we could later split the
files in multiple parts that had a proper dependency order, and even
automatically did the file-splitting based on dependencies with
toplevel-form granularity. (The output from this project was dropped
for political reasons, though, sigh).

Sorry, my memories are growing dim, and I don't have access to this
codebase anymore. I might know people who have access and might be
able to dig it out (or then again might not—the code might have been
archived with the old revision control system when ITA was absorbed by
Google, and no one is going to get paid to fight bureaucracy to get to
ancient code; and it probably was in a branch which will make
archaeology harder).

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
“In reviewing the history of the English Government, its wars and its taxes,
a bystander, not blinded by prejudice nor warped by interest, would declare
that taxes were not raised to carry on wars, but that wars were raised
to carry on taxes.”  — Thomas Paine, “Rights of Man”




On Sat, Dec 31, 2022 at 12:43 AM Robert Dodier <robert.dod...@gmail.com> wrote:
>
> Hi, thanks for your help so far.
>
> I have noticed that asdf-dependency-grovel doesn't handle functions
> which are defined after a reference. E.g. suppose a file says (defun f
> () (g)) and G hasn't been defined yet. Then a file that's loaded
> afterwards says (defun g ()). If the loading order of the files were
> reversed, ADG would detect the dependency, but as it stands, ADG sees
> that there is a new symbol G but doesn't output a dependency for that.
>
> It seems like the problem might be originating from dependencies being
> detected at the time that the reference is detected. It seems like if
> the definitions and references were all generated, and then all of the
> references matched with definitions after everything is loaded, then
> ADG would detect out-of-order references. Just guessing there.
>
> Do you see an easy way to get ADG to detect out-of-order dependencies?
> The reason I ask is that the practical example I am interested in
> (Maxima) has a lot of those.
>
> Thanks for any insights,
>
> Robert

Reply via email to