Bug 16353 - [GTK] Check for deprecated API use (G_DISABLE_DEPRECATED etc.)
Summary: [GTK] Check for deprecated API use (G_DISABLE_DEPRECATED etc.)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Minor
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2007-12-08 05:31 PST by Alp Toker
Modified: 2007-12-27 15:14 PST (History)
1 user (show)

See Also:


Attachments
patch to define the flags mentioned during debug builds (3.32 KB, patch)
2007-12-27 05:49 PST, Jan Alonzo
alp: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alp Toker 2007-12-08 05:31:57 PST
We should have a special build target (perhaps in addition to Debug and Release) that can be used to check for deprecated API use in WebKit/GTK+.

These are the relevant flags GIMP enables:

-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE

We would also add (for the GStreamer code):

-DGST_DISABLE_DEPRECATED

There may be others I've missed, but these seem the most important.

These flags probably shouldn't be used in standard build profiles since they may cause the build to break needlessly in the long term. They should be used only to assist developers in tracking down bad API use, similarly to -Werror.
Comment 1 Jan Alonzo 2007-12-26 23:34:09 PST
Hi! I don't see why we need another target for this. Normally, _DISABLE_DEPRECATED is part of the 'debug' profile since debug builds are usually the place for fixing this sort of things. 

> These flags probably shouldn't be used in standard build profiles since they
> may cause the build to break needlessly in the long term

Just wondering what sort of build breakages are you expecting to come if we enable these flags in the 'debug' build?
Comment 2 Alp Toker 2007-12-26 23:41:23 PST
(In reply to comment #1)
> Hi! I don't see why we need another target for this. Normally,
> _DISABLE_DEPRECATED is part of the 'debug' profile since debug builds are
> usually the place for fixing this sort of things.

Adding these flags only for debug builds sounds fine to me. We don't want to use them in release builds since a release build needs to be forward-compatible.
Comment 3 Jan Alonzo 2007-12-27 05:49:38 PST
Created attachment 18130 [details]
patch to define the flags mentioned during debug builds

This patch defines the flags only when doing debug builds.

cheers
Comment 4 Alp Toker 2007-12-27 15:12:31 PST
Comment on attachment 18130 [details]
patch to define the flags mentioned during debug builds

r=me

There's some bad whitespace changes in WebCore.pro and you missed wrapping GST_DISABLE_DEPRECATED withCONFIG(debug) though. Will fix up before landing.
Comment 5 Alp Toker 2007-12-27 15:14:41 PST
Landed in r29006.