Thread Language through FileBuildSettings NFC

Will make it easier to work with cached settings.
This commit is contained in:
Ben Langmuir
2019-12-18 15:51:30 -08:00
parent a1c2bf7c54
commit cffced1844
6 changed files with 35 additions and 19 deletions

View File

@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2020 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
@@ -171,7 +171,10 @@ extension BuildServerBuildSystem: BuildSystem {
public func settings(for uri: DocumentURI, _ language: Language) -> FileBuildSettings? {
if let response = try? self.buildServer?.sendSync(SourceKitOptions(uri: uri)) {
return FileBuildSettings(compilerArguments: response.options, workingDirectory: response.workingDirectory)
return FileBuildSettings(
compilerArguments: response.options,
workingDirectory: response.workingDirectory,
language: language)
}
return nil
}