Improve target dependency not found fatalError (#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.
This commit is contained in:
Jerry Marino
2020-06-09 15:55:04 +10:00
committed by GitHub
parent f61af8caa9
commit 1e3f93a859
+1 -1
View File
@@ -340,7 +340,7 @@ public class PBXProjGenerator {
func generateTargetDependency(from: String, to target: String) -> PBXTargetDependency {
guard let targetObject = targetObjects[target] ?? targetAggregateObjects[target] else {
fatalError("target not found")
fatalError("Target dependency not found: from ( \(from) ) to ( \(target) )")
}
let targetProxy = addObject(