Gary King | 1 Jan 2008 16:28
Favicon
Gravatar

Re: ASDF test-op

Hi Robert,

I think that your proposal(s) are both steps in the right direction.  
Just to clarify (and to think out load), there are two issues we'd  
like to solve:

  1. allow ASDF to communicate the results of an operation back to the  
caller
  2. control the stream to which ASDF sends output during an operation

In particular, we'd like to do this for test-ops but other ops could  
also make use of this.

The most general solution might be to

  1. add a generic function:

      (defgeneric output-stream-for-component-and-operation (component  
operation))

  2. add an `output-stream` slot to operation

  3. add an around method to perform

		(defmethod perform :around ((operation operation) (c component))
		  (let ((*standard-output* (output-stream-for-operation-and-component
					    operation component)))
		    (call-next-method)))

  4. and a "default" value for output-stream-for-component-and-operation
(Continue reading)

Gary King | 2 Jan 2008 01:23
Favicon
Gravatar

Re: [PATCH] have OPERATION-DONE-P return NIL for TEST-OP by default

I'd like to commit this; is there any dissent?

On Dec 10, 2007, at 7:50 PM, Luis Oliveira wrote:

> Gary King <gwking <at> metabang.com> writes:
>> however, that I'd prefer to dispatch only on systems, not components
>> (only because it seems more minimal). I'm also less convinced about
>> the component-depends-on method. Maybe that should also go only for
>> systems. Either way, if these are documented, it shouldn't be a
>> problem for people to override them as needed. (Though that should be
>> tested).
>
> That makes sense to me.  The attached patch does that instead.
>
> Index: asdf.lisp
> ===================================================================
> RCS file: /cvsroot/cclan/asdf/asdf.lisp,v
> retrieving revision 1.110
> diff -u -r1.110 asdf.lisp
> --- asdf.lisp	27 Sep 2007 13:15:06 -0000	1.110
> +++ asdf.lisp	11 Dec 2007 00:01:30 -0000
>  <at>  <at>  -861,6 +861,9  <at>  <at> 
> (defmethod perform ((operation test-op) (c component))
>   nil)
>
> +(defmethod operation-done-p ((operation test-op) (c system))
> +  nil)
> +
> (defgeneric load-preferences (system operation)
>   (:documentation "Called to load system preferences after <perform  
(Continue reading)

Robert P. Goldman | 2 Jan 2008 03:56

Re: [PATCH] have OPERATION-DONE-P return NIL for TEST-OP by default

My only counter is that we're contemplating other changes to the test-op; maybe we should have that
discussion and commit all relevant changes in one fell swoop instead of piecemeal and possibly inconsistently.
In regards to which, I will try to answer your email tomorrow, when I'm at something more capable than this treo!
___
Robert P. Goldman
Senior Scientist, SIFT, LLC
www.sift.info

 ..... Original Message .......
On Tue, 1 Jan 2008 19:23:24 -0500 "Gary King" <gwking <at> metabang.com> wrote:
>I'd like to commit this; is there any dissent?
>
>On Dec 10, 2007, at 7:50 PM, Luis Oliveira wrote:
>
>> Gary King <gwking <at> metabang.com> writes:
>>> however, that I'd prefer to dispatch only on systems, not components
>>> (only because it seems more minimal). I'm also less convinced about
>>> the component-depends-on method. Maybe that should also go only for
>>> systems. Either way, if these are documented, it shouldn't be a
>>> problem for people to override them as needed. (Though that should be
>>> tested).
>>
>> That makes sense to me.  The attached patch does that instead.
>>
>> Index: asdf.lisp
>> ===================================================================
>> RCS file: /cvsroot/cclan/asdf/asdf.lisp,v
>> retrieving revision 1.110
>> diff -u -r1.110 asdf.lisp
>> --- asdf.lisp	27 Sep 2007 13:15:06 -0000	1.110
(Continue reading)

Robert Goldman | 2 Jan 2008 15:08
Favicon

Re: ASDF test-op

Gary King wrote:
> Hi Robert,
> 
> I think that your proposal(s) are both steps in the right direction.
> Just to clarify (and to think out load), there are two issues we'd like
> to solve:
> 
>  1. allow ASDF to communicate the results of an operation back to the
> caller

This one seems to require more radical surgery and a good deal of thought.

Proposal:  let's put a solution to #2 in place because we can do this
with RELATIVELY little modification to ASDF 1.x.  Your #1 seems to edge
us very clear to ASDF 2.0.

I don't *mind* that, but I'd like to see a solution to #2 not be put on
the back-burner for that long.

>  2. control the stream to which ASDF sends output during an operation
> 
> In particular, we'd like to do this for test-ops but other ops could
> also make use of this.
> 
> The most general solution might be to
> 
>  1. add a generic function:
> 
>      (defgeneric output-stream-for-component-and-operation (component
> operation))
(Continue reading)

Gary King | 2 Jan 2008 20:05
Favicon
Gravatar

Re: [PATCH] have OPERATION-DONE-P return NIL for TEST-OP by default

Hi Robert,

Agreed.

On Jan 1, 2008, at 9:56 PM, Robert P. Goldman wrote:

> My only counter is that we're contemplating other changes to the  
> test-op; maybe we should have that discussion and commit all  
> relevant changes in one fell swoop instead of piecemeal and possibly  
> inconsistently.
> In regards to which, I will try to answer your email tomorrow, when  
> I'm at something more capable than this treo!

--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Todd Sabin | 2 Jan 2008 21:04
Favicon

Re: ASDF test-op

Robert Goldman <rpgoldman <at> real-time.com> writes:

>>  2. control the stream to which ASDF sends output during an operation
>> 
>> In particular, we'd like to do this for test-ops but other ops could
>> also make use of this.
>> 
>> The most general solution might be to
>> 
>>  1. add a generic function:
>> 
>>      (defgeneric output-stream-for-component-and-operation (component
>> operation))
>> 
>>  2. add an `output-stream` slot to operation
>
> 2.5 Add an :output-stream initarg to operation.  I figure that this was
> implicit in your 2, but just wanted to be explicit...
> [etc.]

Hi,

Doesn't ASDF already write all of its output to a particular stream,
namely *verbose-out*?  (Provided you've bound it to something, of
course) Couldn't you just document that test-op writers should write
to that stream?  Or maybe that doesn't work because, by default, it's
bound to nil, so you define another dynamic variable *test-output*, or
something, and document that?

I guess I don't really understand the problem you're solving, and I'm
(Continue reading)

Robert Goldman | 2 Jan 2008 21:54
Favicon

Re: ASDF test-op

Todd Sabin wrote:
> Robert Goldman <rpgoldman <at> real-time.com> writes:
> 
>>>  2. control the stream to which ASDF sends output during an operation
>>>
>>> In particular, we'd like to do this for test-ops but other ops could
>>> also make use of this.
>>>
>>> The most general solution might be to
>>>
>>>  1. add a generic function:
>>>
>>>      (defgeneric output-stream-for-component-and-operation (component
>>> operation))
>>>
>>>  2. add an `output-stream` slot to operation
>> 2.5 Add an :output-stream initarg to operation.  I figure that this was
>> implicit in your 2, but just wanted to be explicit...
>> [etc.]
> 
> Hi,
> 
> Doesn't ASDF already write all of its output to a particular stream,
> namely *verbose-out*?  (Provided you've bound it to something, of
> course) Couldn't you just document that test-op writers should write
> to that stream?  Or maybe that doesn't work because, by default, it's
> bound to nil, so you define another dynamic variable *test-output*, or
> something, and document that?
> 
> I guess I don't really understand the problem you're solving, and I'm
(Continue reading)

Gary King | 2 Jan 2008 23:28
Favicon
Gravatar

Re: ASDF test-op

Hi Todd,

What Robert said.

>> Doesn't ASDF already write all of its output to a particular stream,
>> namely *verbose-out*?

Yes, ASDF sends _its_ output to *verbose-out* which will be *standard- 
output* if you pass in :verbose t to the operate function (which is  
the default).

>> I guess I don't really understand the problem you're solving, and I'm
>> wondering why all the CLOS machinery is necessary...

The CLOS machinery probably isn't necessary but it's damn fun <smile>.  
More seriously, the machinery is there to allow customization on both  
a per-system basis and a per-operation basis. I can imagine wanting to  
save off compiler information separately from test information, for  
example.

HTH,
--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
(Continue reading)

Todd Sabin | 3 Jan 2008 00:25
Favicon

Re: ASDF test-op

Robert Goldman <rpgoldman <at> real-time.com> writes:
> Todd Sabin wrote:
>> 
>> Hi,
>> 
>> Doesn't ASDF already write all of its output to a particular stream,
>> namely *verbose-out*?  (Provided you've bound it to something, of
>> course) Couldn't you just document that test-op writers should write
>> to that stream?  Or maybe that doesn't work because, by default, it's
>> bound to nil, so you define another dynamic variable *test-output*, or
>> something, and document that?
>> 
>> I guess I don't really understand the problem you're solving, and I'm
>> wondering why all the CLOS machinery is necessary...
>> 
>
> What we're trying to avoid is having the test outputs be mixed in with
> the normal ASDF outputs.
>
> Here's a concrete bad (by "bad" I mean "undesirable," not "buggy")
> behavior I have seen:
>
> I have a test-op for a large and complex system.  This test op loads
> multiple ASDF components, each of which gets compiled.
>
> The problem is that instead of getting a nice printed output from my
> testing, I get a stew of compiler messages and test outputs all mooshed
> together.  This makes it hard for me to see if the tests went ok.
>
> So I'd like to send the test outputs off somewhere else, so I don't have
(Continue reading)

Todd Sabin | 3 Jan 2008 00:48
Favicon

Re: ASDF test-op

Gary King <gwking <at> metabang.com> writes:

> Hi Todd,
>
> What Robert said.
>
>>> Doesn't ASDF already write all of its output to a particular stream,
>>> namely *verbose-out*?
>
> Yes, ASDF sends _its_ output to *verbose-out* which will be *standard-
> output* if you pass in :verbose t to the operate function (which is
> the default).
>
>>> I guess I don't really understand the problem you're solving, and I'm
>>> wondering why all the CLOS machinery is necessary...
>
> The CLOS machinery probably isn't necessary but it's damn fun <smile>.
> More seriously, the machinery is there to allow customization on both
> a per-system basis and a per-operation basis. I can imagine wanting to
> save off compiler information separately from test information, for
> example.

I just replied to Robert, the essence of which is that I still don't
quite see the need, and I think what's been proposed (as I understand
it) won't work out the way you want.

Maybe a full patch of what you're proposing would help.

--

-- 
Todd Sabin                                          <tsabin <at> optonline.net>
(Continue reading)


Gmane