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.

Attachment: signature.asc
Description: PGP signature

Reply via email to