Skip to content

Commit 15af8d2

Browse files
authored
Merge pull request #1581 from ahoppen/module-rearrange
Re-arrange modules for clarity
2 parents 8fea9fa + 4c8916a commit 15af8d2

File tree

176 files changed

+384
-410
lines changed

Some content is hidden

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

176 files changed

+384
-410
lines changed

Documentation/Modules.md

Lines changed: 13 additions & 48 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 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.
@@ -36,69 +40,27 @@ Swift types to represent the [Language Server Protocol (LSP) specification, vers
3640

3741
### LanguageServerProtocolJSONRPC
3842

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
46-
47-
### LSPTestSupport
48-
49-
FIXME: Merge this module with SKTestSupport
43+
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.
5044

5145
### SemanticIndex
5246

5347
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.
5448

55-
### SKCore
56-
57-
FIXME: Currently serves two independent purposes and should be split up into two modules
58-
59-
#### BuildSystem
60-
61-
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.
49+
### SKLogging
6250

63-
This includes:
64-
- BuildConfiguration.swift
65-
- BuildServerBuildSystem.swift
66-
- BuildSetup.swift
67-
- BuildSystem.swift
68-
- BuildSystemDelegate.swift
69-
- BuildSystemManager.swift
70-
- CompilationDatabase.swift
71-
- CompilationDatabaseBuildSystem.swift
72-
- FallbackBuildSystem.swift
73-
- FileBuildSettings.swift
74-
- IndexTaskID.swift
75-
- MainFilesProvider.swift
76-
- PathPrefixMapping.swift
77-
- SplitShellCommand.swift
78-
- WorkspaceType.swift
51+
Types that are API-compatible with OSLog that allow logging to OSLog when building for Apple platforms and logging to stderr or files on non-Apple platforms. This should not be dependent on any LSP specific types and be portable to other packages.
7952

80-
#### ToolchainRegistry
81-
82-
Discovers Swift toolchains on the system.
83-
84-
- Toolchain.swift
85-
- ToolchainRegistry.swift
86-
- XCToolchainPlist.swift
53+
### SKOptions
8754

55+
Configuration options to change how SourceKit-LSP behaves, based on [Configuration files](Configuration%20File.md).
8856

8957
### SKSupport
9058

9159
Contains SourceKit-LSP-specific helper functions. These fall into three different categories:
9260
- 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`
61+
- Functionality that can only be implemented by combining two lower-level modules that don't have a shared dependency, like `SKLogging` + `LanguageServerProtocol`
9462
- 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`.
9563

96-
### SKSwiftPMWorkspace
97-
98-
Implements the `BuildSystem` protocol for Swift packages.
99-
100-
FIXME: Merge this into the BuildSystem module once SKCore is split.
101-
10264
### SKTestSupport
10365

10466
A collection of utilities useful for writing tests for SourceKit-LSP and which are not specific to a single test module.
@@ -119,3 +81,6 @@ This is the core module that implements the SourceKit-LSP server.
11981

12082
Extensions to the Swift standard library and Foundation. Should not have any other dependencies. Any types in here should theoretically make senses to put in the Swift standard library or Foundation and they shouldn't be specific to SourceKit-LSP
12183

84+
#### ToolchainRegistry
85+
86+
Discovers Swift toolchains on the system.

0 commit comments

Comments
 (0)