add inteface to fetch build target sources

This commit is contained in:
Richard Howell
2019-09-25 15:37:59 -07:00
parent 1158e1178a
commit 315070d6f7
11 changed files with 167 additions and 0 deletions

View File

@@ -183,6 +183,17 @@ extension BuildServerBuildSystem: BuildSystem {
}
}
}
public func buildTargetSources(targets: [BuildTargetIdentifier], reply: @escaping ([SourcesItem]?) -> Void) {
let req = BuildTargetSources(targets: targets)
_ = self.buildServer?.send(req, queue: requestQueue) { result in
if let items = result.success?.items { reply(items) }
else {
log("error fetching build target sources: \(result)")
reply(nil)
}
}
}
}
private func loadBuildServerConfig(path: AbsolutePath, fileSystem: FileSystem) throws -> BuildServerConfig {