Commit Graph

8 Commits

Author SHA1 Message Date
Ben Barham
e540e169bc Revert "Show a progress indicator in the editor if SourceKit-LSP is reloading packages" 2023-07-17 21:56:35 -07:00
Alex Hoppen
24317f1e97 Show a progress indicator in the editor if SourceKit-LSP is reloading packages
I noticed that the initial package loading can take ~5s. It’s good behavior to inform the client that sourcekit-lsp is busy reloading the package, showing the user that semantic functionality might not be ready yet.

https://github.com/apple/sourcekit-lsp/issues/620
rdar://111917300
2023-07-17 11:08:20 -07:00
Saleem Abdulrasool
d1b1b48908 SourceKitLSPTests: replace some fatalError with XCTFail
This replaces many instances of `fatalError` with `XCTFail`.  Although
these code paths should not come to pass, there are currently failures
in the test suite on Windows where these trigger.  By using `XCTFail`
instead, we allow the tests to continue execution which is helpful for
investigating the current state and make progress towards fixing the
issues.
2022-07-17 17:30:18 -07:00
Alex Hoppen
df594e332c Set a default timeout duration
Instead of having ad-hoc timeout durations in all the test cases, specify a default timeout duration that can be used by tests.

This allows us increase the timeout duration for all tests if we discover that e.g. sourcekitd is slower in CI setups.

rdar://91615376
2022-06-14 17:26:06 +02:00
Saleem Abdulrasool
6a275d134c Fix the Pipe handling on Windows to be correct
This actually addresses the real issue that was ignored earlier about
pipes on Windows.  The FileHandle cannot provide a non-owning file
descriptor (the returned file descriptor would need to be explicitly
`_close`'d by the receiver).  Foundation now vends a `_handle` accessor
to the OS primitive handle.  Use this to create the dispatch loop for
messaging.  We now create the JSONRPCConnection from handles on Windows
which actually should help enable running some of the tests on Windows
as well.
2020-11-02 09:55:58 -08:00
Ben Langmuir
5449a2acb7 [jsonrpc] Workaround file descriptor lifetime issue
We should solve this in the JSONRPCConnection itself, but in the
meantime workaround by keeping pipes alive until the connection has
closed.
2020-06-09 13:20:15 -07:00
Alex Hoppen
f167126c8d Fix typo: JSONRPCConnection should be spelled with two 'n' 2019-11-29 10:20:02 -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