Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1e3f93a

Browse files
authored
Improve target dependency not found fatalError (yonaskolb#883)
It's pretty tricky to find out how to fix it otherwise. Hitting this often when using XcodeGen with XCHammer for Bazel Xcode projects. XCHammer simply pulls in transitive targets, but users can filter out a subset of targets based on paths. Both XCHammer and XcodeGen Yaml give users flexibility for specify what targets are in their Xcode project, so it's useful to give them a better validation error if they create one.
1 parent f61af8c commit 1e3f93a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/XcodeGenKit/PBXProjGenerator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public class PBXProjGenerator {
340340

341341
func generateTargetDependency(from: String, to target: String) -> PBXTargetDependency {
342342
guard let targetObject = targetObjects[target] ?? targetAggregateObjects[target] else {
343-
fatalError("target not found")
343+
fatalError("Target dependency not found: from ( \(from) ) to ( \(target) )")
344344
}
345345

346346
let targetProxy = addObject(

0 commit comments

Comments
 (0)