mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Revert asyncificaiton changes
The asyncification changes caused some non-deterministic test failures. I believe that some of these are due to race conditions that are the result of the partial transition to actors. Instead of merging the asyncification piece by piece, I will collect the changes asyncification changes in a branch and then qualify that branch througougly (running CI multiple times) before merging it into `main`.
This commit is contained in:
@@ -39,30 +39,17 @@ public enum FileHandlingCapability: Comparable {
|
||||
public protocol BuildSystem: AnyObject {
|
||||
|
||||
/// The path to the raw index store data, if any.
|
||||
var indexStorePath: AbsolutePath? { get async }
|
||||
var indexStorePath: AbsolutePath? { get }
|
||||
|
||||
/// The path to put the index database, if any.
|
||||
var indexDatabasePath: AbsolutePath? { get async }
|
||||
var indexDatabasePath: AbsolutePath? { get }
|
||||
|
||||
/// Path remappings for remapping index data for local use.
|
||||
var indexPrefixMappings: [PathPrefixMapping] { get async }
|
||||
var indexPrefixMappings: [PathPrefixMapping] { get }
|
||||
|
||||
/// Delegate to handle any build system events such as file build settings
|
||||
/// initial reports as well as changes.
|
||||
var delegate: BuildSystemDelegate? { get async }
|
||||
|
||||
/// Set the build system's delegate.
|
||||
///
|
||||
/// - Note: Needed so we can set the delegate from a different actor isolation
|
||||
/// context.
|
||||
func setDelegate(_ delegate: BuildSystemDelegate?) async
|
||||
|
||||
/// Retrieve build settings for the given document with the given source
|
||||
/// language.
|
||||
///
|
||||
/// Returns `nil` if the build system can't provide build settings for this
|
||||
/// file or if it hasn't computed build settings for the file yet.
|
||||
func buildSettings(for document: DocumentURI, language: Language) async throws -> FileBuildSettings?
|
||||
var delegate: BuildSystemDelegate? { get set }
|
||||
|
||||
/// Register the given file for build-system level change notifications, such
|
||||
/// as command line flag changes, dependency changes, etc.
|
||||
@@ -70,16 +57,16 @@ public protocol BuildSystem: AnyObject {
|
||||
/// IMPORTANT: When first receiving a register request, the `BuildSystem` MUST asynchronously
|
||||
/// inform its delegate of any initial settings for the given file via the
|
||||
/// `fileBuildSettingsChanged` method, even if unavailable.
|
||||
func registerForChangeNotifications(for: DocumentURI, language: Language) async
|
||||
func registerForChangeNotifications(for: DocumentURI, language: Language)
|
||||
|
||||
/// Unregister the given file for build-system level change notifications,
|
||||
/// such as command line flag changes, dependency changes, etc.
|
||||
func unregisterForChangeNotifications(for: DocumentURI) async
|
||||
func unregisterForChangeNotifications(for: DocumentURI)
|
||||
|
||||
/// Called when files in the project change.
|
||||
func filesDidChange(_ events: [FileEvent]) async
|
||||
func filesDidChange(_ events: [FileEvent])
|
||||
|
||||
func fileHandlingCapability(for uri: DocumentURI) async -> FileHandlingCapability
|
||||
func fileHandlingCapability(for uri: DocumentURI) -> FileHandlingCapability
|
||||
}
|
||||
|
||||
public let buildTargetsNotSupported =
|
||||
|
||||
Reference in New Issue
Block a user