---------- Forwarded message --------- From: Faré fahree@gmail.com Date: Thu, Dec 15, 2022, 04:02 Subject: Re: Lisp file and/or ASDF dependency analysis; trying to load asdf-dependency-grovel To: Robert Dodier robert.dodier@gmail.com
asdf-dependency-grovel predates asdf 2, and probably bitrotted with asdf 3. My guess is that its dependency-op needs a prepare-dependency-op the same way that load-source-op has a prepare-load-source-op. The entire class hierarchy could probably be lifted the same way, except of course for the perform method.
Sorry I have no time to dig into the code. Hope this helps.
On Thu, Dec 15, 2022, 02:08 Robert Dodier robert.dodier@gmail.com wrote:
Hi, I'm interested in analyzing dependencies among a collection of Lisp files, or analyzing dependencies stated in a .asd file, or both.
(1) Towards the goal of analyzing dependencies among Lisp files, I'm trying to load asdf-dependency-grovel, and I'm not having any luck. I obtained a tar.gz of the current version from Gitlab, from the project https://gitlab.common-lisp.net/xcvb/asdf-dependency-grovel. I found it necessary to patch tests/run-tests.sh to get anywhere (patch below) and I get the following error at this point:
$ sh tests/run-tests.sh This is SBCL 2.1.6, an implementation of ANSI Common Lisp.
WARNING: redefining UIOP/UTILITY:PARSE-BODY in DEFUN WARNING: Deprecated recursive use of (ASDF/OPERATE:OPERATE 'ASDF/LISP-ACTION:LOAD-OP '("test-serial-system")) while visiting (ASDF-DEPENDENCY-GROVEL:DEPENDENCY-OP "test-serial" "asdf-dependency-grovel-test/serial")
- please use proper dependencies instead
debugger invoked on a SIMPLE-ERROR in thread #<THREAD "main thread" RUNNING {988AB081}>: Just performed compiling #<INSTRUMENTED-CL-SOURCE-FILE "test-serial-system" "package"> but failed to mark it done
Can anyone offer any advice about the "failed to mark it done" error? or the bit about "deprecated recursive use"?
(2) About looking at dependencies stated in a .asd file, I have a .asd file which ASDF is refusing to load because it has a circular dependency. Is there a way to get ASDF to tell me what that circular dependency is? Failing that, can someone suggest any tools to extract a directed graph from a .asd file? I suppose it wouldn't be too hard to do it myself but no need to reinvent the wheel.
I'm thinking I could find a graph analysis library to extract any cycles, if I had a directed graph in hand. I don't suppose someone has already automated looking for cycles in .asd files?
Thanks in advance for any advice, I appreciate your help.
best,
Robert Dodier
PS. Here's my patch for asdf-dependency-grovel.
$ diff -u tests/run-tests.sh-original tests/run-tests.sh --- tests/run-tests.sh-original 2022-12-13 22:39:50.174826971 -0800 +++ tests/run-tests.sh 2022-12-13 22:43:41.675974917 -0800 @@ -5,7 +5,10 @@
ADG_TEST_DIR="$(dirname $0)"
-$LISP --load ${ADG_TEST_DIR}/grovel-tests.lisp --eval '(uiop:quit (asdf-dependency-grovel-tester:test-result))' +$LISP --eval '(require (quote asdf))'\
- --eval '(push
"/home/robert/by-others/asdf-dependency-grovel-master/" asdf:*central-registry*)'\
- --eval '(push
"/home/robert/by-others/asdf-dependency-grovel-master/tests/" asdf:*central-registry*)'\
- --load ${ADG_TEST_DIR}/grovel-tests.lisp --eval '(uiop:quit
(asdf-dependency-grovel-tester:test-result))' STATUS=$? rm -rf asdf-dependency-grovel-tmp-* #$LISP --load ${ADG_TEST_DIR}/grovel-tests.lisp --eval '(asdf-dependency-grovel-tester:check-base-deps)' --eval '(uiop:quit)'