octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test failures with current mercurial sources (was Re: 3.0.1 release?


From: David Bateman
Subject: Re: test failures with current mercurial sources (was Re: 3.0.1 release?)
Date: Thu, 03 Apr 2008 16:59:09 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080306)

John W. Eaton wrote:
> On  3-Apr-2008, David Bateman wrote:
>
> | How do we do this in a way that is called once.. Imagine a deprecated
> | function in the inner loop of a function that is called 1000s of times.
> | Is there an existing mechanism to make the warning only appear once
> | before we come back to the prompt or do we need some like
> | 
> | persistent warned = false;
> | if (! warned)
> |   warned = true;
> |   warning ("Octave:deprecated-function",
> |      "OLD-FCN is obsolete and will be removed from Octave VERSION;
> | please use NEW-FCN instead");
> | endif
> | 
> | I don't consider that its a good idea to have this warning off by
> | default, and then the warning doesn't serve its purpose.
>
> Yes, I agree that it should only appear once.  I don't see a better
> way than the one you show above.  I first thought of having something
> like
>
>   PKG_ADD: warning ("once", "Octave:deprecated-function");
>
> but that would apply to all warnings tagged with
> Octave:deprecated-function, so we would need to choose unique tags.
> We could use Octave:FCN-deprecated instead to make them unique.  Would
> that be better?  It might apply to other functions, so implementing
> the "once" feature for warning might be useful enough to justify the
> effort.  What do you think?
>
> jwe
>
>   
Yes that might be a nice feature, but I think you'd then also need

warning ("clear", "Octave:deprecated-function");

so that the fact that the warning has already appeared might be
cleared.. Will the fact that there are a large number of named warning
make things slower however? If so I think I'd prefer to forgo it..

D.


-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]