Skip to content

Commit 6e70b89

Browse files
authored
Merge pull request #795 from daveinglis/file_resolver
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
2 parents 978b179 + 21ab5b3 commit 6e70b89

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/SWBCore/ProjectModel/FilePathResolver.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ public final class FilePathResolver: Sendable
8383
sourceTreePath = resolveSourceTree(.buildSetting("TARGET_BUILD_DIR"), forReference: reference)
8484
}
8585

86-
// 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: <rdar://problem/29410050> Swift Build doesn't support product references with non-constant basenames
87-
return sourceTreePath.join(productReference.name)
86+
return sourceTreePath.join(scope.evaluate(scope.table.namespace.parseString(productReference.name)))
8887

8988
default:
9089
preconditionFailure("Cannot resolve the path for a \(type(of: reference))")

0 commit comments

Comments
 (0)