Skip to content

Commit 8c34a76

Browse files
committed
Rename LSPLogging to SKLogging
1 parent 8fea9fa commit 8c34a76

File tree

94 files changed

+132
-141
lines changed

Some content is hidden

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

94 files changed

+132
-141
lines changed

Documentation/Modules.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,7 @@ Swift types to represent the [Language Server Protocol (LSP) specification, vers
3636

3737
### LanguageServerProtocolJSONRPC
3838

39-
A connection to or from a SourceKit-LSP server. Since message parsing can fail, it needs to handle errors in some way and the design decision here is to use LSPLogging, which hardcodes `org.swift.sourcekit-lsp` as the default logging subsystem and thus makes the module unsuitable for generic clients.
40-
41-
### LSPLogging
42-
43-
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.
44-
45-
FIXME: Rename the module to SKLogging
39+
A connection to or from a SourceKit-LSP server. Since message parsing can fail, it needs to handle errors in some way and the design decision here is to use SKLogging, which hardcodes `org.swift.sourcekit-lsp` as the default logging subsystem and thus makes the module unsuitable for generic clients.
4640

4741
### LSPTestSupport
4842

@@ -85,12 +79,15 @@ Discovers Swift toolchains on the system.
8579
- ToolchainRegistry.swift
8680
- XCToolchainPlist.swift
8781

82+
### SKLogging
83+
84+
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.
8885

8986
### SKSupport
9087

9188
Contains SourceKit-LSP-specific helper functions. These fall into three different categories:
9289
- Extensions on top of `swift-tools-support-core`
93-
- Functionality that can only be implemented by combining two lower-level modules that don't have a shared dependency, like `LSPLogging` + `LanguageServerProtocol`
90+
- Functionality that can only be implemented by combining two lower-level modules that don't have a shared dependency, like `SKLogging` + `LanguageServerProtocol`
9491
- Types that should be sharable by the different modules that implement SourceKit-LSP but that are not generic enough to fit into `SwiftExtensions`, like `ExperimentalFeatures`.
9592

9693
### SKSwiftPMWorkspace

Package.swift

Lines changed: 39 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ let package = Package(
3838
),
3939

4040
// MARK: BuildServerProtocol
41-
// Connection between build server and language server to provide build and index info
4241

4342
.target(
4443
name: "BuildServerProtocol",
@@ -49,19 +48,21 @@ let package = Package(
4948
),
5049

5150
// MARK: CAtomics
51+
5252
.target(
5353
name: "CAtomics",
5454
dependencies: []
5555
),
5656

5757
// MARK: CSKTestSupport
58+
5859
.target(
5960
name: "CSKTestSupport",
6061
dependencies: []
6162
),
6263

6364
// MARK: Csourcekitd
64-
// C modules wrapper for sourcekitd.
65+
6566
.target(
6667
name: "Csourcekitd",
6768
dependencies: [],
@@ -74,8 +75,8 @@ let package = Package(
7475
name: "Diagnose",
7576
dependencies: [
7677
"InProcessClient",
77-
"LSPLogging",
7878
"SKCore",
79+
"SKLogging",
7980
"SKSupport",
8081
"SourceKitD",
8182
"SourceKitLSP",
@@ -93,11 +94,11 @@ let package = Package(
9394
name: "DiagnoseTests",
9495
dependencies: [
9596
"Diagnose",
96-
"LSPLogging",
9797
"LSPTestSupport",
98-
"SourceKitD",
9998
"SKCore",
99+
"SKLogging",
100100
"SKTestSupport",
101+
"SourceKitD",
101102
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
102103
]
103104
),
@@ -108,15 +109,15 @@ let package = Package(
108109
name: "InProcessClient",
109110
dependencies: [
110111
"LanguageServerProtocol",
111-
"LSPLogging",
112112
"SKCore",
113+
"SKLogging",
113114
"SourceKitLSP",
114115
],
115116
exclude: ["CMakeLists.txt"]
116117
),
117118

118119
// MARK: LanguageServerProtocol
119-
// The core LSP types, suitable for any LSP implementation.
120+
120121
.target(
121122
name: "LanguageServerProtocol",
122123
dependencies: [],
@@ -132,13 +133,12 @@ let package = Package(
132133
),
133134

134135
// MARK: LanguageServerProtocolJSONRPC
135-
// LSP connection using jsonrpc over pipes.
136136

137137
.target(
138138
name: "LanguageServerProtocolJSONRPC",
139139
dependencies: [
140140
"LanguageServerProtocol",
141-
"LSPLogging",
141+
"SKLogging",
142142
],
143143
exclude: ["CMakeLists.txt"]
144144
),
@@ -151,27 +151,6 @@ let package = Package(
151151
]
152152
),
153153

154-
// MARK: LSPLogging
155-
// Logging support used in LSP modules.
156-
157-
.target(
158-
name: "LSPLogging",
159-
dependencies: [
160-
"SwiftExtensions",
161-
.product(name: "Crypto", package: "swift-crypto"),
162-
],
163-
exclude: ["CMakeLists.txt"],
164-
swiftSettings: lspLoggingSwiftSettings
165-
),
166-
167-
.testTarget(
168-
name: "LSPLoggingTests",
169-
dependencies: [
170-
"LSPLogging",
171-
"SKTestSupport",
172-
]
173-
),
174-
175154
// MARK: LSPTestSupport
176155

177156
.target(
@@ -191,8 +170,8 @@ let package = Package(
191170
name: "SemanticIndex",
192171
dependencies: [
193172
"LanguageServerProtocol",
194-
"LSPLogging",
195173
"SKCore",
174+
"SKLogging",
196175
"SwiftExtensions",
197176
.product(name: "IndexStoreDB", package: "indexstore-db"),
198177
],
@@ -202,23 +181,21 @@ let package = Package(
202181
.testTarget(
203182
name: "SemanticIndexTests",
204183
dependencies: [
205-
"LSPLogging",
206184
"SemanticIndex",
185+
"SKLogging",
207186
"SKTestSupport",
208187
]
209188
),
210189

211190
// MARK: SKCore
212-
// Data structures and algorithms useful across the project, but not necessarily
213-
// suitable for use in other packages.
214191

215192
.target(
216193
name: "SKCore",
217194
dependencies: [
218195
"BuildServerProtocol",
219196
"LanguageServerProtocol",
220197
"LanguageServerProtocolJSONRPC",
221-
"LSPLogging",
198+
"SKLogging",
222199
"SKSupport",
223200
"SourceKitD",
224201
"SwiftExtensions",
@@ -236,16 +213,34 @@ let package = Package(
236213
]
237214
),
238215

216+
// MARK: SKLogging
217+
218+
.target(
219+
name: "SKLogging",
220+
dependencies: [
221+
"SwiftExtensions",
222+
.product(name: "Crypto", package: "swift-crypto"),
223+
],
224+
exclude: ["CMakeLists.txt"],
225+
swiftSettings: lspLoggingSwiftSettings
226+
),
227+
228+
.testTarget(
229+
name: "SKLoggingTests",
230+
dependencies: [
231+
"SKLogging",
232+
"SKTestSupport",
233+
]
234+
),
235+
239236
// MARK: SKSupport
240-
// Data structures, algorithms and platform-abstraction code that might be generally useful to any Swift package.
241-
// Similar in spirit to SwiftPM's Basic module.
242237

243238
.target(
244239
name: "SKSupport",
245240
dependencies: [
246241
"CAtomics",
247242
"LanguageServerProtocol",
248-
"LSPLogging",
243+
"SKLogging",
249244
"SwiftExtensions",
250245
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
251246
],
@@ -269,8 +264,8 @@ let package = Package(
269264
dependencies: [
270265
"BuildServerProtocol",
271266
"LanguageServerProtocol",
272-
"LSPLogging",
273267
"SKCore",
268+
"SKLogging",
274269
"SwiftExtensions",
275270
.product(name: "SwiftPM-auto", package: "swift-package-manager"),
276271
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
@@ -301,8 +296,8 @@ let package = Package(
301296
"InProcessClient",
302297
"LanguageServerProtocol",
303298
"LSPTestSupport",
304-
"LSPLogging",
305299
"SKCore",
300+
"SKLogging",
306301
"SourceKitLSP",
307302
"SwiftExtensions",
308303
.product(name: "ISDBTestSupport", package: "indexstore-db"),
@@ -312,13 +307,12 @@ let package = Package(
312307
),
313308

314309
// MARK: SourceKitD
315-
// Swift bindings for sourcekitd.
316310

317311
.target(
318312
name: "SourceKitD",
319313
dependencies: [
320314
"Csourcekitd",
321-
"LSPLogging",
315+
"SKLogging",
322316
"SwiftExtensions",
323317
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
324318
],
@@ -343,9 +337,9 @@ let package = Package(
343337
"BuildServerProtocol",
344338
"LanguageServerProtocol",
345339
"LanguageServerProtocolJSONRPC",
346-
"LSPLogging",
347340
"SemanticIndex",
348341
"SKCore",
342+
"SKLogging",
349343
"SKSupport",
350344
"SKSwiftPMWorkspace",
351345
"SourceKitD",
@@ -369,11 +363,11 @@ let package = Package(
369363
name: "SourceKitLSPTests",
370364
dependencies: [
371365
"BuildServerProtocol",
372-
"LSPLogging",
373-
"LSPTestSupport",
374366
"LanguageServerProtocol",
367+
"LSPTestSupport",
375368
"SemanticIndex",
376369
"SKCore",
370+
"SKLogging",
377371
"SKSupport",
378372
"SKTestSupport",
379373
"SourceKitD",

Sources/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ add_subdirectory(Diagnose)
66
add_subdirectory(InProcessClient)
77
add_subdirectory(LanguageServerProtocol)
88
add_subdirectory(LanguageServerProtocolJSONRPC)
9-
add_subdirectory(LSPLogging)
109
add_subdirectory(SemanticIndex)
1110
add_subdirectory(SKCore)
11+
add_subdirectory(SKLogging)
1212
add_subdirectory(SKSupport)
1313
add_subdirectory(SKSwiftPMWorkspace)
1414
add_subdirectory(SourceKitLSP)

Sources/Diagnose/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ set_target_properties(Diagnose PROPERTIES
2626

2727
target_link_libraries(Diagnose PUBLIC
2828
InProcessClient
29-
LSPLogging
3029
SKCore
30+
SKLogging
3131
SourceKitD
3232
SwiftExtensions
3333
ArgumentParser

Sources/Diagnose/CommandLineArgumentsReducer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
import Foundation
14-
import LSPLogging
14+
import SKLogging
1515

1616
// MARK: - Entry point
1717

Sources/Diagnose/MergeSwiftFiles.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
import Foundation
14-
import LSPLogging
14+
import SKLogging
1515

1616
extension RequestInfo {
1717
/// Check if the issue reproduces when merging all `.swift` input files into a single file.

Sources/Diagnose/SourceReducer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
import Foundation
14-
import LSPLogging
14+
import SKLogging
1515
import SourceKitD
1616
@_spi(FixItApplier) import SwiftIDEUtils
1717
import SwiftParser

Sources/InProcessClient/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set_target_properties(InProcessClient PROPERTIES
77

88
target_link_libraries(InProcessClient PUBLIC
99
LanguageServerProtocol
10-
LSPLogging
1110
SKCore
11+
SKLogging
1212
SourceKitLSP
1313
)

Sources/InProcessClient/LocalConnection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
import Dispatch
14-
import LSPLogging
1514
import LanguageServerProtocol
15+
import SKLogging
1616

1717
/// A connection between two message handlers in the same process.
1818
///

Sources/LanguageServerProtocolJSONRPC/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set_target_properties(LanguageServerProtocolJSONRPC PROPERTIES
88
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
99
target_link_libraries(LanguageServerProtocolJSONRPC PRIVATE
1010
LanguageServerProtocol
11-
LSPLogging)
11+
SKLogging)
1212
target_link_libraries(LanguageServerProtocolJSONRPC PRIVATE
1313
$<$<NOT:$<PLATFORM_ID:Darwin>>:swiftDispatch>
1414
$<$<NOT:$<PLATFORM_ID:Darwin>>:Foundation>)

0 commit comments

Comments
 (0)