marcprux · GitHub

Commits on May 31, 2026

  1. Skip bridge gen for inline-reified decoded() (fixes #81) (#82)

    * Skip bridge gen for inline-reified decoded() (fixes #81)
    Auto-generated SkipFirebaseFirestore_Bridge.swift was calling
    getMethodID("decoded", "()Ljava/lang/Object;")! on a method the
    JVM bytecode doesn't expose — Kotlin inline reified functions are
    inlined at the call site and don't emit a callable .class method.
    Swift-native Android callers (non-@bridge-annotated app code)
    crashed immediately with a force-unwrap nil trap as soon as the
    DocumentSnapshot class was loaded.
    Adding // SKIP @NoBridge tells the bridge generator to skip emitting
    the JNI lookup for this declaration. Kotlin callers (Skip-transpiled
    .kt and @bridge-annotated Swift) inline the body at the call site
    and are unaffected.
    Verified: rebuilding a downstream Skip app with this patch removes
    Java_decoded_5_methodID from the generated bridge file (other
    DocumentSnapshot entries — constructor, kotlin, getDoc — stay intact).
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    * Use @inline(__always) for decoded() instead of @NoBridge
    Per review: rather than @NoBridge (which drops decoded() from the bridge
    surface entirely), mark it @inline(__always). Skip emits a Kotlin
    `inline fun <reified T>` so the body is inlined at the call site — no
    JVM-callable `decoded` method exists, so the bridge generator emits no
    broken JNI lookup, AND the reified signature stays reachable for
    native-Swift Android callers. Drops the manual `// SKIP DECLARE`.
    See https://skip.dev/docs/swiftsupport/#reified-types
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    ---------
    Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    Configuration menu

    Browse the repository at this point in the history

  2. Configuration menu

    Browse the repository at this point in the history

  3. Configuration menu

    Browse the repository at this point in the history

Read the original on github.com ↗