Re: [PATCH] Proposal: implement feature-dependent-op

Richard M Kreuter <[email protected]>
Newsgroups gmane.lisp.cclan.general
Message-ID <[email protected]>
Christophe Rhodes <[email protected]> writes:

> ...there are the probably also-undocumented features
> :if-component-dep-fails :ignore/:try-next which let you write
> conditionally-compiled code while still considering the component
> part of the system.

This looks promising.  Thank you.

Questions:

* the feature testing done by :in-order-to ((... (feature ...)))
  doesn't support the composite feature expressions that read-time
  conditionals do.  Is this omission intended?

* the in-order-to notation looks like it applies only to direct
  instances of the operation classes named in the defsystem form, and
  not to instances of subclasses (example below [*]).  This seems like
  a bug; is it intended?

* is there any other way to specify that the component-pathname of a
  module is the same as that of its parent other than the defsystem
  syntax :pathname "."?  Does :pathname "." work the same way
  everywhere?

--
RmK

[*] If you subclass compile-op, the in-order-to processing is ignored
for instances of the subclass.

CL-USER> (defclass foo-compile-op (asdf:compile-op) ())
#<STANDARD-CLASS FOO-COMPILE-OP>
CL-USER> (asdf:defsystem test3
	   :pathname "."
	   :components
	   ((:module "deps"
		     :if-component-dep-fails :try-next
		     :pathname "."
		     :components
		     ((:file "file1"
			     :in-order-to ((compile-op (feature :f1))))
		      (:file "file2"
			     :in-order-to ((compile-op (feature :f2))))))))
#<SYSTEM "test3" {50C0C1A9}>
CL-USER> (asdf:oos 'foo-compile-op 'test3 :force t)
; compiling file "/home/kreuter/lsp/pkg/cclan/asdf/test/file1.lisp" (written 21 JAN 2007 05:28:24 PM):
; compiling (DEFPACKAGE :TEST-PACKAGE ...)
; compiling (IN-PACKAGE :TEST-PACKAGE)
; compiling (DEFVAR *FILE1* ...)

; /home/kreuter/lsp/pkg/cclan/asdf/test/file1.fasl written
; compilation finished in 0:00:00
; compiling file "/home/kreuter/lsp/pkg/cclan/asdf/test/file2.lisp" (written 20 FEB 2002 06:12:35 AM):
; compiling (IN-PACKAGE :TEST-PACKAGE)
; compiling (ASSERT *FILE1*)

; /home/kreuter/lsp/pkg/cclan/asdf/test/file2.fasl written
; compilation finished in 0:00:00
NIL
CL-USER> (asdf:oos 'compile-op 'test3 :force t)
component :F2 not found, required by #<CL-SOURCE-FILE "file2" {50F7AFA9}>
   [Condition of type MISSING-DEPENDENCY]



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.