 
     var objects: [PBXObject] = []
     var fileReferencesByPath: [Path: String] = [:]
-    var groupsByPath: [String: PBXGroup] = [:]
+    var groupsByPath: [Path: PBXGroup] = [:]
 
     var targetNativeReferences: [String: String] = [:]
     var targetBuildFileReferences: [String: String] = [:]


        let groupPath: String = depth == 0 ? path.byRemovingBase(path: basePath).string : path.lastComponent
        let group: PBXGroup
        if let cachedGroup = groupsByPath[groupPath] {
            group = cachedGroup
        } else {
            group = PBXGroup(reference: groupReference, children: groupChildren, sourceTree: .group, name: path.lastComponent, path: groupPath)

            objects.append(.pbxBuildFile(buildFile))
        }

        //TODO: don't generate build files for files that won't be built

        func getBuildFilesForPhase(_ buildPhase: BuildPhase) -> Set<String> {
            let files = sourceGroups.filePaths.filter { getBuildPhaseForPath($0) == buildPhase }.map(generateSourceFile)
            return Set(files.map { $0.buildFile.reference })
        }

