Files
sourcekit-lsp/Sources/BuildServerProtocol/FileOptions.swift
Ben Langmuir ab4a25d581 [BSP] Use URI instead of URL
Similar to LSP, BSP also uses URI. We were handling this correctly
everywhere except one test that was using a string with no scheme.
2019-11-20 09:41:48 -08:00

35 lines
1.2 KiB
Swift

//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
import LanguageServerProtocol
/// The SourceKitOptions request is sent from the client to the server
/// to query for the list of compiler options necessary to compile this file.
public struct SourceKitOptions: RequestType, Hashable {
public static let method: String = "textDocument/sourceKitOptions"
public typealias Response = SourceKitOptionsResult
/// The URI of the document to get options for
public var uri: URI
public init(uri: URI) {
self.uri = uri
}
}
public struct SourceKitOptionsResult: ResponseType, Hashable {
/// The compiler options required for the requested file.
public var options: [String]
/// The working directory for the compile command.
public var workingDirectory: String?
}