From 21ab5b3f4161a2d27b57b4c2292ab59b68d6952c Mon Sep 17 00:00:00 2001 From: Dave Inglis Date: Wed, 16 Jul 2025 12:56:05 -0400 Subject: [PATCH] Update FilePathResovler so the product references can use a build setting This allows the use of $(EXECUTABLE_NAME) in product file references rdar://problem/29410050 --- Sources/SWBCore/ProjectModel/FilePathResolver.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sources/SWBCore/ProjectModel/FilePathResolver.swift b/Sources/SWBCore/ProjectModel/FilePathResolver.swift index 49834473..d78b65d0 100644 --- a/Sources/SWBCore/ProjectModel/FilePathResolver.swift +++ b/Sources/SWBCore/ProjectModel/FilePathResolver.swift @@ -83,8 +83,7 @@ public final class FilePathResolver: Sendable sourceTreePath = resolveSourceTree(.buildSetting("TARGET_BUILD_DIR"), forReference: reference) } - // FIXME: We are relying on the product reference name being constant here. This is currently true, given how our path resolver works, but it is possible to construct an Xcode project for which this doesn't work (Xcode doesn't, however, handle that situation very well). We should resolve this: Swift Build doesn't support product references with non-constant basenames - return sourceTreePath.join(productReference.name) + return sourceTreePath.join(scope.evaluate(scope.table.namespace.parseString(productReference.name))) default: preconditionFailure("Cannot resolve the path for a \(type(of: reference))")