feat(bridge): Kotlin Multiplatform channel — Kotlin → generated ObjC framework → Swift edges
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- kotlin, objective-c, swift
- Ambito
- devtools
Direzione di ricerca
Start by reading the README section “Mixed iOS / React Native / Expo bridging” and the existing bridge-channel implementations that synthesize heuristic edges. Trace how those channels derive names, attach provenance and metadata, and match ObjC to Swift. Done means common Kotlin/Native exports can connect Kotlin symbols through derived ObjC selectors to Swift consumers, while unsupported or hidden constructs do not produce candidates.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The cross-language bridging layer (README → "Mixed iOS / React Native / Expo bridging") covers Swift↔ObjC auto-bridging, the React Native legacy bridge, TurboModules, RN event channels, Expo Modules, and Fabric/Paper views — but not Kotlin Multiplatform: the Kotlin → generated ObjC framework → Swift seam that every KMP mobile monorepo lives on. On such a repo, a shared Kotlin symbol's callers/impact never include its Swift consumers, so blast-radius answers on exactly the symbols both platforms depend on are silently incomplete.
Repo shape
A typical KMP monorepo: shared/src/commonMain/kotlin/** compiled into an Apple framework (via the Kotlin/Native ObjC export), consumed from iosApp/**/*.swift as import SharedKit. Both sides are already indexed individually — Kotlin edges resolve well, Swift symbols/files resolve — but no edge crosses the boundary in either direction.
Why this looks feasible in the existing architecture
The bridge channels already synthesize edges from mechanical naming rules and tag them provenance:'heuristic' with metadata.synthesizedBy. Kotlin/Native's ObjC export rules are similarly mechanical, and the Swift→ObjC prepositional rules you already implement do half the work once the Kotlin→ObjC name is derived:
- Class/interface/object names surface with the framework or
@ObjC*name; top-level functions attach to a<FileName>Ktfacade class. @ObjcName/@ObjCNameand@HidesFromObjCannotations override or remove exposure — parseable from the Kotlin source, same as you verify@objcexposure on the Swift↔ObjC channel.suspend fun foo(bar: T)exports as acompletionHandler:method — a deterministic transform of the Kotlin signature.- Interop-invisible constructs (sealed hierarchy details, default args expanding to overload sets) can simply not emit candidates — a bridge that only claims the mechanical subset is still a large win over no edges.
A kmp-objc-bridge channel emitting the Kotlin-symbol → derived-ObjC-selector candidates, then reusing the existing ObjC→Swift reverse-bridge matching, would connect the seam for the common cases.
Impact / motivation
The failure mode is the dangerous kind: an agent asked "is this shared Kotlin symbol safe to delete" gets a confident, wrong "no callers" because the only callers are Swift (we have hit exactly this, via a renamed Swift binding, before adopting codegraph). We currently mitigate procedurally (repo guidance: treat the KMP boundary as invisible; cross-language name search before any unused/impact conclusion), but the graph is the right place for these edges, and issue #765's point about explore/edge reliability on multi-language repos applies doubly when a whole language boundary has no channel.
Happy to test a build against a real ~2,200-file KMP monorepo (Kotlin + Swift + generated framework) and report resolution rates if that helps.
- Lingua principale
- C
- Stelle
- 73.2k
- Fork
- 4.7k
- Merge medio
- 11h 28m
- PR unite (30g)
- 596
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di colbymchenry/codegraph
-
codegraph ui - does not workAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
colbymchenry/codegraph#1900 · 2 commenti · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
colbymchenry/codegraph#1700 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
colbymchenry/codegraph#1535 · 2 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
colbymchenry/codegraph#1403 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-target
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
colbymchenry/codegraph#649 · 5 commenti · 50 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di colbymchenry/codegraph
Issue simili
-
TLS: a stale OpenSSL error makes non-blocking reads fail with "Resource temporarily unavailable"Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
bigtreetech/BIGTREETECH-TouchScreenFirmware#3056 ·
I maintainer di solito rispondono entro 1 giorno
-
Allow pillow 13Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
[pico][astrocade] emu/apply.sh edits src/mame/midway/astrohome.cpp, which current MAME has in bally/Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
FujiNetWIFI/fujinet-firmware#2120 ·
I maintainer di solito rispondono entro 1 giorno