mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-18 22:02:49 +08:00
4a64ca56cd
The classic React Native bridge links a JS callsite to a native module method, but only ONE platform's impl — the other (the iOS method when JS resolved to Android, or vice versa) looked like nothing called it and editing it showed no blast radius. Same gap fixed for Expo, now for the classic bridge. `rnCrossPlatformEdges`: a native method (java/kotlin/objc/cpp) that HAS a JS-side `calls` edge is a confirmed bridge method; link it to the same-named native method in another language (the other platform's impl), both directions. Names are normalized to the first selector keyword (`getFreeDiskStorage:` → `getFreeDiskStorage`) so an iOS selector lines up with the bare Android name. RN runtime-infrastructure methods (addListener / getConstants / getName / … — present on every module) are excluded so they don't cross-link unrelated modules in a multi-module repo. Measured on react-native-device-info: 152 cross-platform pairs (Java↔ObjC↔C++); the classic JS→Java/ObjC bridge itself is unchanged. Heuristic edges (provenance `heuristic`, `synthesizedBy:'rn-cross-platform'`). Full suite green; node count stable. (Note: iOS methods written with the `RCT_EXPORT_METHOD` macro parse as a macro, not a method node, so only regular ObjC method impls pair today — macro extraction is a separate follow-up.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>