This document outlines the iterative process for identifying and removing deprecated symbols from the WebRTC codebase. The goal is to safely retire old APIs that have zero footprint in internal and external downstream projects.
The tracking bug for this work is webrtc:42224904
A symbol is a candidate for removal only if it meets all of the following:
[[deprecated]] tag was added at least 3 months ago.Perform the following steps to generate a list of exactly 10 candidates for the current removal cycle:
third_party/) for the [[deprecated]] attribute.git blame on the identified lines. Discard any symbols where the deprecation tag was added less than 3 months ago.git grep <SymbolName> in the WebRTC repository. Discard any symbols that still have internal call-sites (these must be migrated first). Discard the oldest symbols first.usage: filter with the fully qualified name (including the webrtc:: namespace) to find semantic references.cs "usage:webrtc::PeerConnectionInterface::kPlanB -file:stable/webrtc"func: filter to identify if the symbol is overridden in downstream implementations.cs "func:InsertEmptyPacket -file:stable/webrtc"usage: returns zero results, perform a content: search for the symbol name (combining with webrtc and language filters to reduce noise) to verify. This avoids missing usages due to indexer limitations.cs "content:ApplyGain webrtc -file:stable/webrtc lang:cpp"third_party/webrtc entirely; only exclude the mirror path (e.g. stable/webrtc), as downstream internal projects may reside in other subdirectories like third_party/webrtc/internal.For the 10 selected candidates:
TODO with a bug number was attached to the deprecated function and removed, add that bug number with a webrtc: prefix to the Bug: line in the commit message. If no specific bug is associated with the removed code, use Bug: webrtc:42224904 as the default tracking bug.rtc_unittests, rtc_pc_unittests, peerconnection_unittests).Symbols that return non-zero usage in downstream projects must not be removed using this process. Instead: