(Lack of) Inheritance of in-order-to dependencies

akater nuclearspace at gmail.com
Mon Jun 21 12:57:51 UTC 2021


I tried to specify a build-time dependency for ASDF system, and failed.

The defsystem option

:depends-on systems

makes “systems” both build-time and runtime dependencies of a system
being defined.  I'm interested in specifying a dependency that is
required at build time only.

I attempted

(defsystem "test-toplevel-in-order-deps"
  :in-order-to ((compile-op (load-op "some-macros")))
  :components ((:file "a")
               (:file "b")))

but this way, some-macros is loaded too late:

(let ((system (find-system "test-toplevel-in-order-deps")))
    (plan-actions
     (make-plan 'sequential-plan 'compile-op system)))
;; =>

((#<PREPARE-OP > . #<SYSTEM "test-toplevel-in-order-deps">)
 (#<PREPARE-OP > . #<CL-SOURCE-FILE "test-toplevel-in-order-deps" "a">)
 (#<COMPILE-OP > . #<CL-SOURCE-FILE "test-toplevel-in-order-deps" "a">)
 (#<PREPARE-OP > . #<CL-SOURCE-FILE "test-toplevel-in-order-deps" "b">)
 (#<COMPILE-OP > . #<CL-SOURCE-FILE "test-toplevel-in-order-deps" "b">)
 (#<PREPARE-OP > . #<SYSTEM "some-macros">)
 ...
 (#<LOAD-OP > . #<SYSTEM "some-macros">)
 (#<COMPILE-OP > . #<SYSTEM "test-toplevel-in-order-deps">))

I'm not requesting a feature but still, it's unfortunate that a
seemingly basic task of specifying build-time dependency is unachievable
in ASDF.

My hypothesis is, if (compile-op . parent) depends on “actions”, then
compiling children of parent should depend on “actions” as well, and
similarly for all instances of downward-operation.  I'm not sure what's
the best way to implement this but I wonder if you find this reasonable
in the first place.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20210621/3c6c190e/attachment.sig>


More information about the asdf-devel mailing list