Commit Graph

23 Commits

Author SHA1 Message Date
Ben Langmuir
44f535fb91 [buildsystem] Wire up BuildSystemManager to SourceKitServer
Wires up the build system manager in the server, and all existing tests.
2020-02-05 21:53:52 -08:00
Ben Langmuir
b917ebe5d9 Infer index store path from compilation database
Find the index store path by searching through the command-line
arguments, and if found, also provide a default database path next to
the index store. Also add command-line arguments so that either of these
can be overridden. We could also easily add these as initialization
options if an LSP client wanted to provide them in the future.
2020-02-03 09:07:01 -08:00
Alex Hoppen
558d7fc664 Change backing storage of DocumentURI to URL
URL can in fact store URIs, it just doesn't have a very nice API to
interact with them. As long as we only operate on absoluteString, we
should be fine though. So instead of implementing the logic for
detecting file URLs ourselves, we can just use a URL as storage for
DocumentURI.
2019-11-20 09:41:48 -08:00
Alex Hoppen
5c839f8640 Add support for non-URL URIs
According to the LSP specification, arbitrary URIs can be used as
document identifiers. Instead of internally assuming that all URIs are
URLs, use a DocumentURI enum to represent URIs. These can either be file
URLs or other URIs whose value as treated as an opaque string.
2019-11-20 09:41:48 -08:00
Ben Langmuir
775e198f77 Rename LSPSupport -> LSPLogging to reflect reduced scope
Ideally we can someday migrate this to something more standard such as
swift-log, and make it explicit how to control logging for the JSONRPC
module.
2019-11-19 11:08:31 -08:00
Alex Hoppen
05ecd26d08 Reorganize the repository into a set of bare LSP modules and SourceKit modules
We will be able to split the LSP modules off later. These LSP modules
will provide the ability to write custom LSP servers and clients in
Swift. The sourcekit-lsp repository will build on top of this new
package to provide an LSP implementation that creates a language server
for Swift and C-based-languages.
2019-11-14 10:35:06 -08:00
David Goldman
043d27860d Remove the need to use Connection to talk to internal LSPs
`SourceKitServer` now talks to the `SwiftLanguageServer` and
`ClangLanguageServerShim` directly through the `ToolchainLanguageServer`
protocol.

Each individual `ToolchainLanguageServer` manages its own threading.

Change-Id: I77aa5468f1486bd4e6e6fdb732c6a051ee05c6d1
2019-10-09 13:49:11 -04:00
Ben Langmuir
89b95f5043 [index] Fix default value for listening to unit changes
Was preventing index from being populated by default.
2019-09-11 08:49:01 -07:00
Ben Langmuir
e1fa70d086 Update SPM -> TSC module name prefixes 2019-09-03 08:29:19 -07:00
Richard Howell
fd6cdfb603 use Codable, start server as part of init, no log on missing config 2019-08-28 15:35:57 -07:00
Richard Howell
366f7d930d Add initial BuildServerBuildSystem based on BSP 2019-08-27 15:47:40 -07:00
Ben Langmuir
ff7d8c1930 [test] Add listenToUnitEvents to initialization options
This should be used along with polling to explicitly control when index
data is read in tests that are outside the sourcekit-lsp process.
2019-08-22 14:53:53 -07:00
Ben Langmuir
aa6087a2c8 Remove testable imports of SourceKit 2019-08-08 22:28:10 -07:00
Ben Langmuir
77351820ce Use AbsolutePath.pathString instead of description
Per review feedback; pathString is semantically the string we want,
while description is for creating a human-readable string.
2019-02-01 18:05:11 -08:00
Ben Langmuir
7f697fa14a [swiftpm] Update to latest master
* import Utility -> import SPMUtility
* AbsolutePath.asString -> path.description or "\(path)"
2019-02-01 16:47:04 -08:00
Marcin Krzyzanowski
6df3545f42 Use BuildSetup in place of Configuration.
Add BuildConfiguration
Cleanup imports
2019-01-15 20:49:38 +01:00
Marcin Krzyzanowski
398ff33b9f SKCore.Configuration reflects a server setup and is passed as a depedency injection deep down. 2019-01-11 19:51:04 +01:00
Marcin Krzyzanowski
a10bd394e0 Pass server configuration down to SwiftPMWorkspace (dependency injection) 2019-01-11 17:54:28 +01:00
Marcin Krzyzanowski
25939e9526 Add command line arguments with a few configuration options. 2019-01-11 00:24:27 +01:00
Ben Langmuir
c17ae6992a [build-system] Rename BuildSettingsProviderList -> BuildSystemList 2018-12-03 23:05:35 -08:00
Ben Langmuir
7f74d4a25f [build-system] Fold ExternalWorkspace into BuildSystem
Simplifies clients to only need to care about one thing, and makes it
easier for BuildSystems to grow new functionality.
2018-12-03 22:54:35 -08:00
Ben Langmuir
63b9b3dbaf [build-system] Rename BuildSettingsProvider->BuildSystem and fix method name
I intend to fold more things than file-settings into here, so use a more
generic name. Also drop an unnecessary word from the method name.
2018-12-03 22:30:18 -08:00
Ben Langmuir
aabf57a252 Import SourceKit-LSP sources 2018-11-13 15:50:48 -08:00