Skip to content

Commit 6d34d70

Browse files
committed
Split SourceKitLSPOptions out of SKCore
This only leaves build system functionality in SKCore, which allows us to rename SKCore.
1 parent cfe18f1 commit 6d34d70

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+76
-31
lines changed

Documentation/Modules.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ This includes:
7171

7272
Types that are API-compatible with OSLog to allow logging to OSLog when building for Darwin platforms and logging to stderr or files on non-Darwin platforms. This should not be dependent on any LSP specific types and be portable to other packages.
7373

74+
### SKOptions
75+
76+
Configuration options to change how SourceKit-LSP behaves, based on [Configuration files](Configuration%20File.md).
77+
7478
### SKSupport
7579

7680
Contains SourceKit-LSP-specific helper functions. These fall into three different categories:

Package.swift

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ let package = Package(
2828
"LanguageServerProtocol",
2929
"LanguageServerProtocolJSONRPC",
3030
"SKCore",
31+
"SKOptions",
3132
"SKSupport",
3233
"SourceKitLSP",
3334
"ToolchainRegistry",
@@ -78,6 +79,7 @@ let package = Package(
7879
"InProcessClient",
7980
"SKCore",
8081
"SKLogging",
82+
"SKOptions",
8183
"SKSupport",
8284
"SourceKitD",
8385
"SourceKitLSP",
@@ -113,6 +115,7 @@ let package = Package(
113115
"LanguageServerProtocol",
114116
"SKCore",
115117
"SKLogging",
118+
"SKOptions",
116119
"SourceKitLSP",
117120
"ToolchainRegistry",
118121
],
@@ -187,6 +190,7 @@ let package = Package(
187190
"LanguageServerProtocol",
188191
"LanguageServerProtocolJSONRPC",
189192
"SKLogging",
193+
"SKOptions",
190194
"SKSupport",
191195
"SourceKitD",
192196
"SwiftExtensions",
@@ -201,6 +205,7 @@ let package = Package(
201205
name: "SKCoreTests",
202206
dependencies: [
203207
"SKCore",
208+
"SKOptions",
204209
"SKTestSupport",
205210
"ToolchainRegistry",
206211
]
@@ -226,6 +231,19 @@ let package = Package(
226231
]
227232
),
228233

234+
// MARK: SKOptions
235+
236+
.target(
237+
name: "SKOptions",
238+
dependencies: [
239+
"LanguageServerProtocol",
240+
"SKLogging",
241+
"SKSupport",
242+
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
243+
],
244+
exclude: ["CMakeLists.txt"]
245+
),
246+
229247
// MARK: SKSupport
230248

231249
.target(
@@ -258,6 +276,7 @@ let package = Package(
258276
"LanguageServerProtocol",
259277
"SKCore",
260278
"SKLogging",
279+
"SKOptions",
261280
"SwiftExtensions",
262281
"ToolchainRegistry",
263282
.product(name: "SwiftPM-auto", package: "swift-package-manager"),
@@ -271,6 +290,7 @@ let package = Package(
271290
dependencies: [
272291
"LanguageServerProtocol",
273292
"SKCore",
293+
"SKOptions",
274294
"SKSwiftPMWorkspace",
275295
"SKTestSupport",
276296
"SourceKitLSP",
@@ -291,6 +311,7 @@ let package = Package(
291311
"LanguageServerProtocolJSONRPC",
292312
"SKCore",
293313
"SKLogging",
314+
"SKOptions",
294315
"SKSupport",
295316
"SourceKitLSP",
296317
"SwiftExtensions",
@@ -336,6 +357,7 @@ let package = Package(
336357
"SemanticIndex",
337358
"SKCore",
338359
"SKLogging",
360+
"SKOptions",
339361
"SKSupport",
340362
"SKSwiftPMWorkspace",
341363
"SourceKitD",
@@ -364,6 +386,7 @@ let package = Package(
364386
"SemanticIndex",
365387
"SKCore",
366388
"SKLogging",
389+
"SKOptions",
367390
"SKSupport",
368391
"SKTestSupport",
369392
"SourceKitD",

Sources/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ add_subdirectory(LanguageServerProtocolJSONRPC)
99
add_subdirectory(SemanticIndex)
1010
add_subdirectory(SKCore)
1111
add_subdirectory(SKLogging)
12+
add_subdirectory(SKOptions)
1213
add_subdirectory(SKSupport)
1314
add_subdirectory(SKSwiftPMWorkspace)
1415
add_subdirectory(SourceKitLSP)

Sources/Diagnose/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ target_link_libraries(Diagnose PUBLIC
2828
InProcessClient
2929
SKCore
3030
SKLogging
31+
SKOptions
3132
SourceKitD
3233
SwiftExtensions
3334
ToolchainRegistry

Sources/Diagnose/IndexCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import ArgumentParser
1414
import Foundation
1515
import InProcessClient
1616
import LanguageServerProtocol
17-
import SKCore
17+
import SKOptions
1818
import SKSupport
1919
import SourceKitLSP
2020
import SwiftExtensions

Sources/InProcessClient/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ target_link_libraries(InProcessClient PUBLIC
99
LanguageServerProtocol
1010
SKCore
1111
SKLogging
12+
SKOptions
1213
SourceKitLSP
1314
ToolchainRegistry
1415
)

Sources/InProcessClient/InProcessSourceKitLSPClient.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import LanguageServerProtocol
1414
import SKCore
15+
import SKOptions
1516
import SKSupport
1617
import SourceKitLSP
1718
import ToolchainRegistry

Sources/SKCore/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11

22
add_library(SKCore STATIC
3-
BuildConfiguration.swift
43
BuildServerBuildSystem.swift
54
BuildSystem.swift
65
BuildSystemDelegate.swift
@@ -12,16 +11,15 @@ add_library(SKCore STATIC
1211
IndexTaskID.swift
1312
MainFilesProvider.swift
1413
PathPrefixMapping.swift
15-
SourceKitLSPOptions.swift
16-
SplitShellCommand.swift
17-
WorkspaceType.swift)
14+
SplitShellCommand.swift)
1815
set_target_properties(SKCore PROPERTIES
1916
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
2017
target_link_libraries(SKCore PUBLIC
2118
BuildServerProtocol
2219
LanguageServerProtocol
2320
LanguageServerProtocolJSONRPC
2421
SKLogging
22+
SKOptions
2523
SKSupport
2624
SourceKitD
2725
SwiftExtensions

Sources/SKCore/FallbackBuildSystem.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import BuildServerProtocol
1414
import Dispatch
1515
import Foundation
1616
import LanguageServerProtocol
17+
import SKOptions
1718
import SKSupport
1819

1920
import enum PackageLoading.Platform

0 commit comments

Comments
 (0)