From 4b300dd2f0a58a1c971237f2738504ec8f8e7efe Mon Sep 17 00:00:00 2001 From: Twisted_Arrow Date: Wed, 2 Sep 2026 07:59:26 +0530 Subject: [PATCH] docs(swift): clarify target grouping parity scope --- .../core/ingestion/languages/swift/target-siblings.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gitnexus/src/core/ingestion/languages/swift/target-siblings.ts b/gitnexus/src/core/ingestion/languages/swift/target-siblings.ts index 47ccc4109..2fc982c62 100644 --- a/gitnexus/src/core/ingestion/languages/swift/target-siblings.ts +++ b/gitnexus/src/core/ingestion/languages/swift/target-siblings.ts @@ -10,10 +10,12 @@ * Module identity: Swift has no in-source `package X` marker. The SPM * target is a directory subtree (`Sources//…`). Module membership * is threaded in via the SPM target map (`ctx.resolutionConfig` → - * `coerceSwiftTargets`) and grouped by `groupSwiftFilesBySpmTarget`, - * replicating legacy `wireSwiftImplicitImports`'s `groupSwiftFilesByTarget`: - * files are grouped by SPM target subtree when a package config is present, - * else ALL Swift files form one module (`__default__`, + * `coerceSwiftTargets`) and grouped by `groupSwiftFilesBySpmTarget`. + * The helper preserves the legacy `wireSwiftImplicitImports` bucketing + * contract for ordinary layouts (first target wins and unmatched files use + * `__default__`) but intentionally fixes #2931's repeated-prefix edge case. + * When a package config is present, files are grouped by SPM target subtree; + * otherwise ALL Swift files form one module (`__default__`, * single-Xcode-project assumption). Every `.swift` file in the same target * sees its siblings' top-level defs. *