Use buildTarget/inverseSources from BSP to get targets of a source file

This commit is contained in:
Alex Hoppen
2024-08-23 15:15:26 -07:00
parent 63c5ca4a2c
commit b490a6fef1
16 changed files with 250 additions and 97 deletions

View File

@@ -110,8 +110,8 @@ package protocol BuiltInBuildSystem: AnyObject, Sendable {
language: Language
) async throws -> FileBuildSettings?
/// Return the list of targets and run destinations that the given document can be built for.
func targets(for document: DocumentURI) async -> [BuildTargetIdentifier]
/// Return the list of targets that the given document can be built for.
func inverseSources(_ request: InverseSourcesRequest) async -> InverseSourcesResponse
/// Schedule a task that re-generates the build graph. The function may return before the build graph has finished
/// being generated. If clients need to wait for an up-to-date build graph, they should call