mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
[build-system] Fold ExternalWorkspace into BuildSystem
Simplifies clients to only need to care about one thing, and makes it easier for BuildSystems to grow new functionality.
This commit is contained in:
@@ -11,10 +11,24 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import LanguageServerProtocol
|
||||
import Basic
|
||||
|
||||
/// Provider of build settings.
|
||||
/// Provider of FileBuildSettings and other build-related information.
|
||||
///
|
||||
/// The primary role of the build system is to answer queries for FileBuildSettings and (TODO) to
|
||||
/// notify clients when they change. The BuildSystem is also the source of related informatino,
|
||||
/// such as where the index datastore is located.
|
||||
///
|
||||
/// For example, a SwiftPMWorkspace provides compiler arguments for the files contained in a
|
||||
/// SwiftPM package root directory.
|
||||
public protocol BuildSystem {
|
||||
|
||||
/// The path to the raw index store data, if any.
|
||||
var indexStorePath: AbsolutePath? { get }
|
||||
|
||||
/// The path to put the index database, if any.
|
||||
var indexDatabasePath: AbsolutePath? { get }
|
||||
|
||||
/// Returns the settings for the given url and language mode, if known.
|
||||
func settings(for: URL, _ language: Language) -> FileBuildSettings?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user