From 4224d8af7a35575b7b3d8078cb68700dbeb6486b Mon Sep 17 00:00:00 2001 From: Jeroen <76699269+IT-Guy007@users.noreply.github.com> Date: Fri, 3 Jul 2026 11:37:35 +0200 Subject: [PATCH] fix(Pipeline): remove SKIP REPLACE override that hides search() from bridge peer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pipeline.search(query:) carried a `// SKIP REPLACE:` comment specifying an identical-in-substance Kotlin body to what the naive Swift-to-Kotlin transpile already produces. That override causes SkipBridge to silently omit `search` from the generated Swift bridge peer (Pipeline_Bridge.swift) used by SKIP_BRIDGE-flagged consumer builds (e.g. Skip apps targeting Android), even though the Kotlin transpile output itself is correct. limit(_:), offset(_:), and whereCondition(_:) — which have no REPLACE override — bridge correctly. Consumer symptom: `swift build --swift-sdk aarch64-unknown-linux-android28 ... -DSKIP_BRIDGE` fails with "value of type 'Pipeline' has no member 'search'" despite the Kotlin side compiling fine. Removing the override lets the naive transpile (verified byte-identical Kotlin output) stand, restoring bridge visibility. --- Sources/SkipFirebaseFirestore/Pipeline.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Sources/SkipFirebaseFirestore/Pipeline.swift b/Sources/SkipFirebaseFirestore/Pipeline.swift index 5c8277f..789dbfb 100644 --- a/Sources/SkipFirebaseFirestore/Pipeline.swift +++ b/Sources/SkipFirebaseFirestore/Pipeline.swift @@ -129,7 +129,13 @@ public final class Pipeline { /// /// Typically combined with ``DocumentMatches(_:)``: /// `pipeline.search(query: DocumentMatches("..."))`. - // SKIP REPLACE: fun search(query: PipelineBooleanExpression): Pipeline = Pipeline(platformPipeline = platformPipeline.search(com.google.firebase.firestore.pipeline.SearchStage.withQuery(query.expression))) + /// + /// No `// SKIP REPLACE:` override here on purpose: the body below already + /// transpiles to equivalent Kotlin via direct interop, and a `SKIP REPLACE` + /// override on this method causes SkipBridge to silently omit `search` + /// from the generated Swift bridge peer (`Pipeline_Bridge.swift`) even + /// though the Kotlin transpile output is correct — `limit`/`offset`/ + /// `whereCondition`, which have no override, bridge fine. public func search(query: PipelineBooleanExpression) -> Pipeline { Pipeline(platformPipeline: platformPipeline.search( com.google.firebase.firestore.pipeline.SearchStage.withQuery(query.expression)