Skip to content

Commit 1902611

Browse files
committed
Rename SKCore to BuildSystemIntegration
1 parent c8174fd commit 1902611

File tree

49 files changed

+88
-110
lines changed

Some content is hidden

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

49 files changed

+88
-110
lines changed

Documentation/Modules.md

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Swift types to represent the [Build Server Protocol (BSP) specification, version
88

99
FIXME: Add link for BSP and version
1010

11+
### BuildSystemIntegration
12+
13+
Defines the queries SourceKit-LSP can ask of a a build system, like getting compiler arguments for a file. Finding a target’s dependencies or preparing a target.
14+
1115
### CAtomics
1216

1317
Implementation of atomics for Swift using C. Once we can raise our deployment target to use the `Atomic` type from the Swift standard library, this module should be removed.
@@ -42,31 +46,6 @@ A connection to or from a SourceKit-LSP server. Since message parsing can fail,
4246

4347
Contains the interface with which SourceKit-LSP queries the semantic index, adding up-to-date checks on top of the indexstore-db API. Also implements the types that manage background indexing.
4448

45-
### SKCore
46-
47-
FIXME: Currently serves two independent purposes and should be split up into two modules
48-
49-
#### BuildSystem
50-
51-
Defines the queries SourceKit-LSP can ask of a a build system, like getting compiler arguments for a file. Finding a target’s dependencies or preparing a target.
52-
53-
This includes:
54-
- BuildConfiguration.swift
55-
- BuildServerBuildSystem.swift
56-
- BuildSetup.swift
57-
- BuildSystem.swift
58-
- BuildSystemDelegate.swift
59-
- BuildSystemManager.swift
60-
- CompilationDatabase.swift
61-
- CompilationDatabaseBuildSystem.swift
62-
- FallbackBuildSystem.swift
63-
- FileBuildSettings.swift
64-
- IndexTaskID.swift
65-
- MainFilesProvider.swift
66-
- PathPrefixMapping.swift
67-
- SplitShellCommand.swift
68-
- WorkspaceType.swift
69-
7049
### SKLogging
7150

7251
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.
@@ -86,7 +65,7 @@ Contains SourceKit-LSP-specific helper functions. These fall into three differen
8665

8766
Implements the `BuildSystem` protocol for Swift packages.
8867

89-
FIXME: Merge this into the BuildSystem module once SKCore is split.
68+
FIXME: Merge this into the BuildSystem module once BuildSystemIntegration is split.
9069

9170
### SKTestSupport
9271

Package.swift

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ let package = Package(
3030
.executableTarget(
3131
name: "sourcekit-lsp",
3232
dependencies: [
33+
"BuildSystemIntegration",
3334
"Diagnose",
3435
"LanguageServerProtocol",
3536
"LanguageServerProtocolJSONRPC",
36-
"SKCore",
3737
"SKOptions",
3838
"SKSupport",
3939
"SourceKitLSP",
@@ -57,6 +57,38 @@ let package = Package(
5757
swiftSettings: strictConcurrencySettings
5858
),
5959

60+
// MARK: BuildSystemIntegration
61+
62+
.target(
63+
name: "BuildSystemIntegration",
64+
dependencies: [
65+
"BuildServerProtocol",
66+
"LanguageServerProtocol",
67+
"LanguageServerProtocolJSONRPC",
68+
"SKLogging",
69+
"SKOptions",
70+
"SKSupport",
71+
"SourceKitD",
72+
"SwiftExtensions",
73+
"ToolchainRegistry",
74+
.product(name: "SwiftPMDataModel-auto", package: "swift-package-manager"),
75+
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
76+
],
77+
exclude: ["CMakeLists.txt"],
78+
swiftSettings: strictConcurrencySettings
79+
),
80+
81+
.testTarget(
82+
name: "BuildSystemIntegrationTests",
83+
dependencies: [
84+
"BuildSystemIntegration",
85+
"SKOptions",
86+
"SKTestSupport",
87+
"ToolchainRegistry",
88+
],
89+
swiftSettings: strictConcurrencySettings
90+
),
91+
6092
// MARK: CAtomics
6193

6294
.target(
@@ -84,8 +116,8 @@ let package = Package(
84116
.target(
85117
name: "Diagnose",
86118
dependencies: [
119+
"BuildSystemIntegration",
87120
"InProcessClient",
88-
"SKCore",
89121
"SKLogging",
90122
"SKOptions",
91123
"SKSupport",
@@ -106,8 +138,8 @@ let package = Package(
106138
.testTarget(
107139
name: "DiagnoseTests",
108140
dependencies: [
141+
"BuildSystemIntegration",
109142
"Diagnose",
110-
"SKCore",
111143
"SKLogging",
112144
"SKTestSupport",
113145
"SourceKitD",
@@ -122,8 +154,8 @@ let package = Package(
122154
.target(
123155
name: "InProcessClient",
124156
dependencies: [
157+
"BuildSystemIntegration",
125158
"LanguageServerProtocol",
126-
"SKCore",
127159
"SKLogging",
128160
"SKOptions",
129161
"SourceKitLSP",
@@ -177,8 +209,8 @@ let package = Package(
177209
.target(
178210
name: "SemanticIndex",
179211
dependencies: [
212+
"BuildSystemIntegration",
180213
"LanguageServerProtocol",
181-
"SKCore",
182214
"SKLogging",
183215
"SwiftExtensions",
184216
"ToolchainRegistry",
@@ -198,38 +230,6 @@ let package = Package(
198230
swiftSettings: strictConcurrencySettings
199231
),
200232

201-
// MARK: SKCore
202-
203-
.target(
204-
name: "SKCore",
205-
dependencies: [
206-
"BuildServerProtocol",
207-
"LanguageServerProtocol",
208-
"LanguageServerProtocolJSONRPC",
209-
"SKLogging",
210-
"SKOptions",
211-
"SKSupport",
212-
"SourceKitD",
213-
"SwiftExtensions",
214-
"ToolchainRegistry",
215-
.product(name: "SwiftPMDataModel-auto", package: "swift-package-manager"),
216-
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
217-
],
218-
exclude: ["CMakeLists.txt"],
219-
swiftSettings: strictConcurrencySettings
220-
),
221-
222-
.testTarget(
223-
name: "SKCoreTests",
224-
dependencies: [
225-
"SKCore",
226-
"SKOptions",
227-
"SKTestSupport",
228-
"ToolchainRegistry",
229-
],
230-
swiftSettings: strictConcurrencySettings
231-
),
232-
233233
// MARK: SKLogging
234234

235235
.target(
@@ -296,8 +296,8 @@ let package = Package(
296296
name: "SKSwiftPMWorkspace",
297297
dependencies: [
298298
"BuildServerProtocol",
299+
"BuildSystemIntegration",
299300
"LanguageServerProtocol",
300-
"SKCore",
301301
"SKLogging",
302302
"SKOptions",
303303
"SwiftExtensions",
@@ -312,8 +312,8 @@ let package = Package(
312312
.testTarget(
313313
name: "SKSwiftPMWorkspaceTests",
314314
dependencies: [
315+
"BuildSystemIntegration",
315316
"LanguageServerProtocol",
316-
"SKCore",
317317
"SKOptions",
318318
"SKSwiftPMWorkspace",
319319
"SKTestSupport",
@@ -330,11 +330,11 @@ let package = Package(
330330
.target(
331331
name: "SKTestSupport",
332332
dependencies: [
333+
"BuildSystemIntegration",
333334
"CSKTestSupport",
334335
"InProcessClient",
335336
"LanguageServerProtocol",
336337
"LanguageServerProtocolJSONRPC",
337-
"SKCore",
338338
"SKLogging",
339339
"SKOptions",
340340
"SKSupport",
@@ -365,8 +365,8 @@ let package = Package(
365365
.testTarget(
366366
name: "SourceKitDTests",
367367
dependencies: [
368+
"BuildSystemIntegration",
368369
"SourceKitD",
369-
"SKCore",
370370
"SKTestSupport",
371371
"SwiftExtensions",
372372
"ToolchainRegistry",
@@ -380,10 +380,10 @@ let package = Package(
380380
name: "SourceKitLSP",
381381
dependencies: [
382382
"BuildServerProtocol",
383+
"BuildSystemIntegration",
383384
"LanguageServerProtocol",
384385
"LanguageServerProtocolJSONRPC",
385386
"SemanticIndex",
386-
"SKCore",
387387
"SKLogging",
388388
"SKOptions",
389389
"SKSupport",
@@ -411,9 +411,9 @@ let package = Package(
411411
name: "SourceKitLSPTests",
412412
dependencies: [
413413
"BuildServerProtocol",
414+
"BuildSystemIntegration",
414415
"LanguageServerProtocol",
415416
"SemanticIndex",
416-
"SKCore",
417417
"SKLogging",
418418
"SKOptions",
419419
"SKSupport",

Sources/SKCore/CMakeLists.txt renamed to Sources/BuildSystemIntegration/CMakeLists.txt

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

2-
add_library(SKCore STATIC
2+
add_library(BuildSystemIntegration STATIC
33
BuildServerBuildSystem.swift
44
BuildSystem.swift
55
BuildSystemDelegate.swift
@@ -12,9 +12,9 @@ add_library(SKCore STATIC
1212
MainFilesProvider.swift
1313
PathPrefixMapping.swift
1414
SplitShellCommand.swift)
15-
set_target_properties(SKCore PROPERTIES
15+
set_target_properties(BuildSystemIntegration PROPERTIES
1616
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
17-
target_link_libraries(SKCore PUBLIC
17+
target_link_libraries(BuildSystemIntegration PUBLIC
1818
BuildServerProtocol
1919
LanguageServerProtocol
2020
LanguageServerProtocolJSONRPC

0 commit comments

Comments
 (0)