[Insight-developers] Annoying Deprecation Warnings : Annoying but Necessary.

Bill Lorensen bill.lorensen at gmail.com
Thu Dec 20 12:07:46 EST 2007


Brad,

That's a great idea. Also, if you see the exchange this morning. the
itkLegacyMacro was not being used properly. That accounts for the bad gcc
warnings. I'll check in the changes to fix that shortly.

Luis,
I agree that it is important to warn, may main concern was the bad
information in the gcc warnings. That will be fixed when I check in the
changes.

Bill

On Dec 20, 2007 12:04 PM, Brad King <brad.king at kitware.com> wrote:

> Luis Ibanez wrote:
> >
> > Bill,
> >
> > If the concern is the amount of warnings, you can enable in those builds
> > the CMake variable:
> >
> >                      ITK_LEGACY_SILENT
> >
> >
> > We shouldn't remove the warnings, because that's how we alert users
> > about the fact that this deprecated code is going to be removed in
> > a future release.
> >
> > These warnings are the early opportunity for users to stop using code
> > that will disappear. If we remove the warnings, then users will be
> > surprised when we actually remove the code, which is exactly the
> > situation that the backward compatibility policy wants to avoid .
> >
> >
> > My suggestion is that ITK_LEGACY_SILENT should be OFF by default,
> > and that Dashboard machines should set it to ON.
> >
> > In this way, users will get the warnings, but the Dashboard will
> > not display them and will not be cluttered with them.
>
> One possibility is that the dashboards be built with ITK_LEGACY_REMOVE.
>  Then the deprecation stuff won't show up at all (and thus will not
> warn), and we will know that no ITK examples use deprecated stuff.
>
> On the other hand we probably want the deprecated stuff to still be
> tested by the Testing directory.  It isn't possible to test deprecated
> methods without calling them.  Therefore the individual tests (at least)
> should be built with ITK_LEGACY_SILENT.  We should probably create tests
> that are meant specifically to test the deprecated methods, and remove
> calls to deprecated methods from other tests and examples.  Then we can
> define a new macro like ITK_LEGACY_TEST at the top of the test's .cxx
> file and setup itkMacro.h to interpret this as ITK_LEGACY_SILENT:
>
> // testMyDeprecatedMethod.cxx
> #define ITK_LEGACY_TEST
> #include "itkClassWithDeprecatedMethod.h"
> ...
>
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20071220/5764143d/attachment.html


More information about the Insight-developers mailing list