Commit Graph

16 Commits

Author SHA1 Message Date
Alex Hoppen
aefa1688e4 Add support for semantic functionality for non-URL files in FallbackBuildSystem
In the fallback build system use the URIs pseudo path to construct
compiler arguments. For non-file URIs this means passing the raw URI as
the filename. We were already testing non-existing file-URLs like /a.txt
and arbitrary URIs seem to allow semantic functionality as well.
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
Richard Howell
26d3fca5dd use LSPResult instead of optionals 2019-10-04 15:14:04 -07:00
Richard Howell
0f6f260701 add interface for fetching output paths 2019-10-04 14:51:26 -07:00
Richard Howell
315070d6f7 add inteface to fetch build target sources 2019-10-04 14:50:46 -07:00
Richard Howell
e3fce37388 use LSPResult instead of optional 2019-10-01 14:33:06 -07:00
Richard Howell
ab1ee4ea8c return empty reply instead of ignoring targets request 2019-09-25 14:27:44 -07:00
Richard Howell
81c50db7e1 add the workspace/buildTargets request 2019-09-25 14:16:30 -07:00
David Goldman
e5caf44fda Add a BuildSystemDelegate which supports notifications for build settings changes
Introduce a `BuildSystemDelegate` to handle notifications from the build system

* `SourceKitServer` is the main delegate to process these notifications
* Currently limited to changes in `FileBuildSettings`
* Delegate informs the `BuildSystem` of files to watch via `registerChangeWatching(for: URL)` and `unregisterChangeWatching(for: URL)`
* In the future we could have more integration for handling changes in dependencies

Handling changes in `FileBuildSettings`

* `SourceKitServer` sends notifications to the internal LSPs informing them of any opened documents that have changes in their compiler flags
    * For clangd, we send a notification to update the compilation database
    * For SourceKit/sourcekitd we must close and reopen the file to force a new AST with the new compiler flags
2019-09-06 17:44:36 -04:00
Ben Langmuir
e1fa70d086 Update SPM -> TSC module name prefixes 2019-09-03 08:29:19 -07:00
Richard Howell
1f57193cf4 add toolchain interface to BuildServer 2019-08-15 11:04:54 -07:00
Richard Howell
f6045fcfdc remove toolchain from FileBuildSettings 2019-08-15 10:53:14 -07:00
Ben Langmuir
b92abf4140 Remove testable imports of SKCore 2019-08-08 21:33:02 -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
Ben Langmuir
802a416c17 [build-system] Rename FallbackBuildSettingsProvider -> FallbackBuildSystem 2018-12-03 23:02:20 -08:00