octave-maintainers
[Top][All Lists]
Advanced

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

Re: xFoo moved to octave namespace -- avoid warnings about deprecated fu


From: Carnë Draug
Subject: Re: xFoo moved to octave namespace -- avoid warnings about deprecated functions for Forge package
Date: Thu, 4 Aug 2016 16:47:34 +0100

On 2 August 2016 at 08:03, John W. Eaton <address@hidden> wrote:
> On 08/02/2016 12:55 AM, Carnë Draug wrote:
>>
>> You may have noticed that Octave has been moving a lot of stuff into
>> the octave namespace while deprecating the versions on the main
>> namespace.  For example, xlog2, xround, xisnan, xmin, and xmax.
>>
>> If a package with oct files wants to support both the upcoming Octave
>> release and current previous Octave releases, this will trigger
>> deprecation
>> warnings, which may cause a lot of new bug reports.
>>
>> I have solved this for the image package by checking at configure time,
>> creating a wrapper that uses what's not deprecated, and use that wrapper
>> instead [1, 2]. May be of interest to other package maintainers.
>
>
> We could also change Octave so that we have something like
>
>   #if ! defined (OCTAVE_DEPRECATED)
>      ... current definition ...
>   #endif
>
> and then you could just define away OCTAVE_DEPRECATED(msg) to avoid the
> warnings.
>
> Or, I think you can just add the GCC option -Wno-deprecated-declarations to
> CXXFLAGS.
>
> jwe

My problem with such solutions is that it would silence all deprecated
warnings which defeats the purpose of the warnings in the first place.
We may deprecate more functions from core before the end of the release.

I prefer a more selective solution, so I can still see warnings for the
things I haven't fixed yet.  I'm active enough in Octave development to
notice it even without the warnings, but I still wouldn't like that as
a solution.



reply via email to

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