Richard M Kreuter | 13 Dec 2006 22:32

Minor doc fix (operate isn't generic)

Hello,

Just a trivial documentation fix: operate isn't a generic function.

--
RmK

--- asdf.texinfo	2006-12-13 16:28:19.000000000 -0500
+++ asdf.texinfo.~1.5.~	2004-08-18 08:54:26.000000000 -0400
 <at>  <at>  -460,8 +460,8  <at>  <at> 

 Operations are invoked on systems via  <at> code{operate}.

- <at> deffn {Function} operate operation system &rest initargs
- <at> deffnx {Function} oos operation system &rest initargs
+ <at> deffn {Generic function} operate operation system &rest initargs
+ <at> deffnx {Generic function} oos operation system &rest initargs
  <at> code{operate} invokes  <at> var{operation} on  <at> var{system}.   <at> code{oos}
 is a synonym for  <at> code{operate}.

-------------------------------------------------------------------------
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
Richard M Kreuter | 14 Dec 2006 21:57

Proposal: make asdf output go to *standard-output*

Hello,

I'd like to propose that asdf send its output to *standard-output* (by
having asdf:operate bind asdf::*verbose-out* to cl:*standard-output*
instead of *trace-output*), and that it be documented that .asd files
and asdf extensions that print output should do so to
*standard-output*, too.  A patch to this effect is appended.

Here's the rationale: there has be some way to stifle output during
asdf:operate in order for programs to use asdf in contexts where it's
necessary to be persnickety about output (e.g., Unix-style scripts and
cron jobs).  At present, there's no way to do this without digging
into asdf.lisp itself, and then there are various deficiencies:

(0) asdf:operate's verbose keyword doesn't stifle very much output
    when nil is supplied.  Compiler and loader output, as well as any
    compile-time or load-time print operations in .asd files or in
    system components still get out.

(1) asdf:operate's verbose keyword only stifles output from that call
    to operate -- output will still be emitted if asdf:operate is
    called during the operation without :verbose nil.  This is the de
    facto standard way to require prerequisite asdf systems, and there
    are a several incidences of this in the wild.

(2) The stream that asdf uses for output internally, *verbose-out*, is
    not exported, and so it's unclear where systems and extensions are
    supposed to send their output.  There's at least one system
    available that prints to *standard-output* in the .asd file.

(Continue reading)

Richard M Kreuter | 14 Dec 2006 22:23

[Corrected patch] Re: Proposal: make asdf output go to *standard-output*


I'm sorry, I often reverse the order of arguments to diff.  Here's
the corrected patch:

--- asdf.lisp.~1.102.~	2006-12-13 15:56:20.000000000 -0500
+++ asdf.lisp	2006-12-14 15:12:09.000000000 -0500
 <at>  <at>  -872,7 +872,7  <at>  <at> 
   (let* ((op (apply #'make-instance operation-class
 		    :original-initargs args
 		    args))
-	 (*verbose-out* (if verbose *trace-output* (make-broadcast-stream)))
+	 (*verbose-out* (if verbose *standard-output* (make-broadcast-stream)))
 	 (system (if (typep system 'component) system (find-system system))))
     (unless (version-satisfies system version)
       (error 'missing-component :requires system :version version))

--- asdf.texinfo.~1.5.~	2004-08-18 08:54:26.000000000 -0400
+++ asdf.texinfo	2006-12-14 15:37:56.000000000 -0500
 <at>  <at>  -188,6 +188,11  <at>  <at> 
 (asdf:operate 'asdf:load-op ' <at> var{foo})
  <at> end example

+Output from asdf and asdf extensions are supposed to be sent to the CL
+stream  <at> code{*standard-output*}, and so rebinding that stream around
+calls to  <at> code{asdf:operate} should redirect all output from asdf
+operations.
+
 That's all you need to know to use asdf to load systems written by
 others.  The rest of this manual deals with writing system
 definitions for Lisp software you write yourself.
(Continue reading)

Richard M Kreuter | 15 Dec 2006 15:11

Re: Proposal: make asdf output go to *standard-output*

Richard M Kreuter <kreuter <at> progn.net> writes:

> Also, for completeness,
>
> (4) The oddball explain-op class is made extra screwy by the above:
>     :verbose nil makes asdf:perform on direct instances of explain-op
>     into no-ops, and subclasses of explain-op that don't either break
>     package system encapsulation or depend on asdf internals can't
>     rely on superclass's methods doing anything.  (Probably the method
>     of asdf:perform that specializes on instances of asdf:explain-op
>     should print to *standard-output* directly, rather than to
>     asdf:*verbose-out*, but that's a separate issue that I don't care
>     much about.)

Oops. asdf:explain isn't a class, but a generic function.
Nevertheless, extensions that would add methods to explain don't have
access to *verbose-out*.

--
RmK

-------------------------------------------------------------------------
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
Gary King | 15 Dec 2006 15:18
Favicon
Gravatar

Re: Proposal: make asdf output go to *standard-output*

Hi Richard,

I'm entirely in favor of this change. Thanks for doing such a great  
write up, by the way. It makes it very clear what you want and why.

On Dec 14, 2006, at 3:57 PM, Richard M Kreuter wrote:

> Hello,
>
> I'd like to propose that asdf send its output to *standard-output* (by
> having asdf:operate bind asdf::*verbose-out* to cl:*standard-output*
> instead of *trace-output*), and that it be documented that .asd files
> and asdf extensions that print output should do so to
> *standard-output*, too.  A patch to this effect is appended.
>
> Here's the rationale: there has be some way to stifle output during
> asdf:operate in order for programs to use asdf in contexts where it's
> necessary to be persnickety about output (e.g., Unix-style scripts and
> cron jobs).  At present, there's no way to do this without digging
> into asdf.lisp itself, and then there are various deficiencies:
>
> (0) asdf:operate's verbose keyword doesn't stifle very much output
>     when nil is supplied.  Compiler and loader output, as well as any
>     compile-time or load-time print operations in .asd files or in
>     system components still get out.
>
> (1) asdf:operate's verbose keyword only stifles output from that call
>     to operate -- output will still be emitted if asdf:operate is
>     called during the operation without :verbose nil.  This is the de
>     facto standard way to require prerequisite asdf systems, and there
(Continue reading)


Gmane