mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-18 13:53:01 +08:00
dbc4862940
Validated the cross-language bridge graph on real RN/Expo repos (expo-battery,
react-native-device-info) and fixed three gaps:
- Generic-typed Expo Functions: Android Expo Modules write `AsyncFunction<Float>
("getBatteryLevelAsync")`, but the framework extractor's regex allowed no
generic type parameter between the keyword and `(`, so EVERY Android Expo
method was silently dropped — a JS call resolved only to the iOS Swift impl.
The regex now accepts an optional `<…>`.
- Cross-platform pairing: an Expo Module exposes the same JS method from BOTH a
Swift (iOS) and a Kotlin (Android) impl, but a JS callsite name-resolves to
only one. New `expoCrossPlatformEdges` links the two platform impls of the same
`<module>.<method>` (both directions), so a JS call reaching one reaches the
other and editing either surfaces the JS caller.
- Cross-language type-reference precision: a `Type.member` static read in native
code (`BatteryManager.EXTRA_LEVEL`, the Android system class) name-matched to a
coincidentally same-named TS class. `references` (type-usage) edges are now
gated to the same language family (JVM java/kotlin/scala, Apple swift/objc, web
ts/js, C c/cpp) at the name-match + import strategies — framework resolvers are
NOT gated, so deliberate config→code bridges (Drupal routing.yml→PHP, Spring
@Value→YAML) and JS↔native `calls` bridges are unaffected.
The classic RN NativeModules bridge (`@ReactMethod`/`RCT_EXPORT_METHOD`) already
worked and is unchanged (118 JS→Java + JS→ObjC `calls` on device-info). Full
suite green; node count stable.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>