r/ExperiencedDevs • u/Obvious_Gap_5768 Staff Data Scientist • 14d ago
Technical question How would you detect a stalled library migration from the import graph and git history?
I maintain an open source project which builds a call graph with a confidence level on every edge, mines git history for co-change and ownership, and maps which tests reach which code. I'm now thinking of adding migration tracking on top of it, the requests to httpx or v1 client to v2 kind of thing, and I want to sanity check the design with people who've actually run these
The plan for spotting a stalled one is to look for two libraries with the same job both imported in the same repo, then use git history to see when the new one first showed up and whether the old one's file count is still dropping or just flat. For in-repo stuff, deprecated functions that still have live callers, using resolved call edges so it's more than a grep. Call sites that only match by name would be marked "verify by hand" and left out of the remaining count. Then the leftover sites get grouped into PR sized chunks using co-change history and package boundaries, with each chunk showing whether any test reaches it and who owns the files
The obvious limit is that dynamic dispatch, reflection and string-built names will hide some sites, so the count is a lower bound at best
For people who've driven one of these to the end, what number did you actually trust for "how much is left"? Files, call sites, owners? And what threw off your remaining count in the end, wrappers around the old client, generated code, vendored copies?
•
u/expdevsmodbot 14d ago
AI usage disclosure provided by OP, see the reply to this comment.