Bite 42 / 4420 views
Software EngineeringIntermediate

Finding the callers of a shared function before you change it

Semantic indexing answers "who calls this symbol?" across repos; grep only tells you where the name appears.

Reviewed by System Admin · Dec 2, 2026 · Editorial standards

Read time~2 min
FormatVisual
Check1 question
AccessFree

Visual breakdown

Interactive

Finding the callers of a shared function before you change it — Visual Breakdown

Click any step below to inspect
Library change
SCIP semantic index
S3 + Athena pipeline
Downstream consumers
Release decision
Sequence of Events

The simple version

No jargon

You want to rename a function in a shared library. Before you touch it, you need to know who calls it. In one repo, you run grep for the function name and read the hits. Across many repos, grep gets noisy. You get matches in comments, matches in strings, and matches for a different function that happens to share the name. The real callers are buried in that noise. Netflix built an internal tool called Quasar to measure the blast radius of library API changes. Quasar is not open-sourced, so you cannot adopt it directly. The pattern is what you can copy. It combines two things: a semantic code index, and a comparison of API versions. A semantic index is built from the compiler's view of your code, not from raw text. It records that a specific function in a specific library is referenced at a specific place. Quasar uses SCIP, an open format for storing that index data. Per the report, its pipeline also relies on Amazon S3 (object storage) and Athena (a SQL service that reads data sitting in S3). So the question changes from "where does this string appear?" to "which repositories reference this exact API?" The answer is a list of downstream consumers, meaning the projects that depend on your library. Maintainers use that list to judge the blast radius: how much breaks if this change ships. Why it matters: a text search tells you what looks like a call. An index tells you what the compiler resolved as a call. That difference is the whole point when a rename touches code you cannot see. Netflix is also exploring agent-assisted consumer migrations, where an agent helps update those consumer repos.

Why it matters in production

A rename feels safe when you can see every caller. In a single repo, grep gives you that. Across many repos, it gives you noise, and noise hides the one caller you missed. Semantic indexing shifts the question from text matching to symbol resolution, so the answer is a list of real consumers. That list is the blast radius. It gives maintainers a concrete picture of which downstream projects a change touches, which informs the release decision. The limit: an index is only as good as its coverage. Repos outside the index stay invisible, and the tool cannot tell you about them.

Implementation & syntax

Read-only example
Bash + python
# --- bash: text search matches names, not resolved calls ---
# It also hits comments, strings, and unrelated symbols.
grep -rn "parse_config" ./repos

# --- python: semantic index rows are resolved references ---
# Each row is tied to a symbol and a file position.
# Sample index.json (schema is illustrative, not Netflix's).
# Real SCIP symbols are longer structured identifiers; this is a
# simplified stand-in using a language-neutral "lib#name" form.
# {
#   "references": [
#     {"symbol": "mylib#parse_config", "repo": "svc-a",
#      "path": "src/main.py", "line": 42},
#     {"symbol": "mylib#parse_config", "repo": "svc-b",
#      "path": "lib/load.py", "line": 7},
#     {"symbol": "otherlib#parse_config", "repo": "svc-c",
#      "path": "util.py", "line": 3}
#   ]
# }
import json

with open("index.json") as f:
    refs = json.load(f)["references"]

callers = [
    r for r in refs
    if r["symbol"] == "mylib#parse_config"
]

for r in callers:
    print(r["repo"], r["path"], r["line"])

Check your understanding

Quick Concept Check

Test your understanding in 15 seconds

Why does plain grep fail to find all callers of a library function across many repositories?

Bite progression42 / 44

Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.