On Tue, 12 Nov 2013 18:04:51 +0100, Mike Reed <
re...@google.com> wrote:
> Skia (and no doubt other libraries used by chrome/blink) has some of its
> API marked as Deprecated. We >have a macro that can formally annotate
> those calls as deprecated, generating a warning at the call->site. This
> seems like a great thing, as it will aid us in finding/fixing those
> call-sites. However, >if we build chrome/blink with warnings-are-errors,
> this breaks the build...
>
>
>
> Can we allow (in gyp I presume) for select warnings to shine-through,
> but not be treated as errors?
In Presto development we did that for quite some years, but I must say the
idea sounds much better than it works out. By setting an API as deprecated
you basically are forcing, or trying to force, someone to adapt to your
changes. People don't always have time to jump in and change their code,
and then the deprecation warning starts building up, people learn to
ignore them, real warnings disappear in the spam and there is no net win.
Also, having multiple APIs at the same time contribute to code bloat.
Better to just do the switch than adding deprecation markers. Or have the
warnings as a non-default compilation mode for those (rare) occasions when
you are interested in them.
(A second data point - the Java compiler used to show lots of deprecation
warnings, but rather quickly moved that to a special flag.)
/Daniel