David Goldman
79795bf4d9
Decrease verbosity of info-level logging ( #331 )
...
- Don't log entire LSP notifications/requests for the `info` level, instead log of the form:
- `Notification<method>` e.g. Notification<textDocument/publishDiagnostics>
- `Request<method(id)>` e.g. Request<textDocument/hover(6)>
- `Response<method(id)` e.g. Response<textDocument/hover(6)>
- Only log sourcekitd requests/responses at the debug level
2020-10-08 18:20:56 -04:00
Ben Langmuir
15d47d880e
Merge pull request #325 from compnerd/extensions
...
SKCore: support executable extensions on different platforms
2020-10-08 11:01:15 -07:00
Ben Langmuir
6df9c68a12
Merge pull request #328 from compnerd/staged
...
build: allow building with dispatch and Foundation from the toolchain
2020-10-08 10:04:08 -07:00
Saleem Abdulrasool
67aaa09d70
build: allow building with dispatch and Foundation from the toolchain
...
This allows building without dispatch and Foundation build roots, which
allows for a multi-phase build. This is intended to support the Windows
staged build where dispatch and Foundation are part of the SDK and
SourceKit-LSP is part of the devtools.
2020-10-07 19:08:02 -07:00
Ben Langmuir
833b36cf29
Merge pull request #327 from DavidGoldman/main
...
Log to stderr instead of sending window/logMessage
2020-10-07 13:18:24 -07:00
David Goldman
482a98893f
Log to stderr instead of sending window/logMessage
...
- clangd itself already logs to stderr so sourcekit-lsp
should do the same for consistency (unless we want to
capture clangd's stderr and forward it in the LSP)
- Editors such as VS Code will show stderr output in the same
output channel where it shows logMessage + traces
Change-Id: Iaf00cffa2e64d8490e21b49a3a9d34a17f54aa9f
2020-10-06 19:18:20 -04:00
Saleem Abdulrasool
3e32ce69f9
SKCore: support executable extensions on different platforms
...
Similar to the dylib extension, introduce executable extensions. This
is required for Windows which uses a `.exe` suffix for the executables.
2020-10-05 15:56:35 -07:00
Ben Langmuir
c49849bd5c
Merge pull request #323 from benlangmuir/test-resources
...
[test] Put shared test projects INPUTS into bundle resources
swift-DEVELOPMENT-SNAPSHOT-2020-10-07-a
2020-10-01 18:24:38 -07:00
Ben Langmuir
a763252305
[test] Fix resource directory on Linux
2020-10-01 15:19:21 -07:00
Ben Langmuir
283e6b8cc8
[package] Fix warnings about unknown files to be excluded
2020-10-01 15:19:21 -07:00
Ben Langmuir
49d13ce85b
[docs] Update test documentation for INPUTS move
2020-10-01 15:19:21 -07:00
Ben Langmuir
41cf3a3764
[test] Put shared test projects INPUTS into bundle resources
...
This avoids depending on the absolute path to the INPUTS and allows
looking it up at run time even if the tests have moved.
2020-10-01 15:19:21 -07:00
Ben Langmuir
79865c70b1
Merge pull request #322 from benlangmuir/for-isdb-test-resources
...
[test] Move inputsDirectory method from indexstore-db
2020-10-01 15:03:41 -07:00
Ben Langmuir
c634ea83ba
[test] Move inputsDirectory method from indexstore-db
...
Minimal change to fix the build.
2020-10-01 11:09:49 -07:00
Ben Langmuir
f44dbd5431
Merge pull request #321 from compnerd/libraries
...
SKCore: adjust library loading for Windows
2020-09-30 16:13:41 -07:00
Saleem Abdulrasool
fe612387b9
SKCore: adjust library loading for Windows
...
The libIndexStore and sourcekitdInProc DLLs actually reside in the
binaries directory on Windows. Adjust the paths appropriately for
Windows. This is required to get the libraries to load correctly.
2020-09-30 14:44:16 -07:00
Ben Langmuir
2c4da0a989
Merge pull request #320 from compnerd/dot
...
SKCore: make `.` part of the extension
2020-09-30 13:56:26 -07:00
Saleem Abdulrasool
00d6ae05b4
SKCore: make . part of the extension
...
This is just a cleanup change to setup the extensions for other targets.
This allows for platforms to have no extensions or an extension which
may or may not include a `.`.
2020-09-29 15:30:29 -07:00
Ben Langmuir
241744da9b
Merge pull request #319 from compnerd/dispatch
...
LanguageServerProtocolJSONRPC: make Windows path work
2020-09-29 15:09:36 -07:00
Saleem Abdulrasool
b33a5171cc
LanguageServerProtocolJSONRPC: make Windows path work
...
This adjusts the use of Dispatch to build on Windows. Windows does not
provide `stdout_fileno` and `stderr_fileno`. However, it is possible to
use `fileno` to get the associated fileno from the descriptor.
Dispatch on Windows does not deal with fd's but rather with handles.
Convert the file descriptor to a handle and pass that off to dispatch.
The handle is a non-owning reference, and should not be closed.
Fortunately, dispatch does not close the handle when the DispatchIO is
closed.
2020-09-29 13:48:06 -07:00
Ben Langmuir
a62aad4539
Merge pull request #311 from compnerd/ucrt
...
build: use `ucrt` on Windows
2020-09-29 10:11:48 -07:00
Saleem Abdulrasool
0326a36334
build: use Foundation for environment variable handling
...
Adjust the environment variable check to be more portable by using
Foundation rather than directly going to the C library which is spelt
differently on each platform.
2020-09-28 14:59:36 -07:00
David Goldman
ae96dcae4e
Improve performance of workspace/symbol for large queries + projects ( #317 )
...
- Avoid short queries (< 3 characters) since they are slow and noisy. Xcode does the same thing.
- Limit the number of results returned:
- Improves performance for queries which match many symbols
- Currently take the first N results to improve performance for large projects
but once we support cancellation we should take the top N.
2020-09-28 15:13:36 -04:00
Ben Langmuir
1d0f901303
Merge pull request #318 from benlangmuir/log-level-literal
...
Fix ExpressibleByArgument conformance on LogLevel
swift-DEVELOPMENT-SNAPSHOT-2020-09-28-a
2020-09-25 15:43:24 -07:00
Ben Langmuir
e7f765747b
Fix ExpressibleByArgument conformance on LogLevel
...
The initializer is failable, not throwing, and there is a default
conformance provided via the integer literal that was not correct.
2020-09-25 14:15:59 -07:00
Mishal Shah
07e0a31766
Merge pull request #315 from benlangmuir/master-to-main
...
Update references to 'master' to 'main'
2020-09-24 11:36:18 -07:00
Ben Langmuir
5d596eb9fb
Merge pull request #316 from benlangmuir/npm-dep-updates
...
[vscode] Update dependencies to fix issues found by `npm audit`
2020-09-23 15:48:40 -07:00
Ben Langmuir
5430ea5256
[vscode] Update dependencies to fix issues found by npm audit
...
Updates to the newer `@types/vscode` package instead of the older
deprecated `vscode` one. We don't seem to need the part that was split
off into `vscode-test`.
2020-09-23 14:31:43 -07:00
Ben Langmuir
70d5c6dea2
Update references to 'master' to 'main'
2020-09-23 11:40:42 -07:00
Ben Langmuir
f2add83fa4
Merge pull request #314 from apple/dependabot/npm_and_yarn/Editors/vscode/lodash-4.17.20
...
Bump lodash from 4.17.15 to 4.17.20 in /Editors/vscode
2020-09-23 11:03:06 -07:00
dependabot[bot]
1f4a755aa9
Bump lodash from 4.17.15 to 4.17.20 in /Editors/vscode
...
Bumps [lodash](https://github.com/lodash/lodash ) from 4.17.15 to 4.17.20.
- [Release notes](https://github.com/lodash/lodash/releases )
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20 )
Signed-off-by: dependabot[bot] <support@github.com >
2020-09-23 04:37:03 +00:00
Ben Langmuir
eaea937ee4
Merge pull request #313 from apple/revert-306-patch-1
...
Revert "Allow double dash for IndexStore-related CLI arguments"
swift-DEVELOPMENT-SNAPSHOT-2020-09-23-a
swift-DEVELOPMENT-SNAPSHOT-2020-09-22-a
swift-DEVELOPMENT-SNAPSHOT-2020-09-17-a
swift-DEVELOPMENT-SNAPSHOT-2020-09-16-a
swift-DEVELOPMENT-SNAPSHOT-2020-09-11-a
2020-09-08 13:01:52 -07:00
Ben Langmuir
8fe23e65bf
Merge pull request #309 from compnerd/build
...
build: update CMakeLists.txt
2020-09-08 10:22:34 -07:00
Ben Langmuir
3cb6642590
Merge pull request #308 from compnerd/compare-to-zero
...
SKSupport: update for `BOOL` conversion on Windows
2020-09-08 10:17:43 -07:00
Ben Langmuir
e3588aa73b
Revert "Allow double dash for IndexStore-related CLI arguments"
2020-09-08 09:34:54 -07:00
Saleem Abdulrasool
c55c71d111
build: update CMakeLists.txt
...
This updates the CMakeLists.txt to allow building SourceKit-LSP with
CMake.
2020-09-06 18:44:34 -07:00
Saleem Abdulrasool
4e9430c9fb
SKSupport: update for BOOL conversion on Windows
...
We would fail to build on Windows due to the conversion of `BOOL` to
`Bool`, and then comparing to `0`. This repairs the build on Windows.
2020-09-06 13:11:54 -07:00
Ben Langmuir
738a001fc5
Merge pull request #306 from MaxDesiatov/patch-1
...
Allow double dash for IndexStore-related CLI arguments
2020-09-02 10:06:15 -07:00
Max Desiatov
8145889a4c
Require ArgumentParser 0.3.1 in Package.swift
2020-09-02 16:50:05 +01:00
Max Desiatov
4fb1a8e961
Allow double dash for IndexStore-related CLI arguments
...
This is possible thanks to the fix in Argument Parser 0.3.1.
2020-09-02 16:49:14 +01:00
Ben Langmuir
3366391746
Merge pull request #304 from MaxDesiatov/argumentparser
...
Adopt swift-argument-parser for argument parsing
swift-DEVELOPMENT-SNAPSHOT-2020-08-31-a
swift-DEVELOPMENT-SNAPSHOT-2020-08-30-a
2020-08-28 10:22:39 -07:00
Max Desiatov
58769c50d7
Fix log level option, use single dash in new options
2020-08-27 22:09:43 +01:00
Max Desiatov
51c367c918
Remove unused import
2020-08-27 21:29:11 +01:00
Max Desiatov
fb5e0d4d50
Adopt swift-argument-parser for argument parsing
2020-08-27 21:27:52 +01:00
Gaushik M.R
5ac9e6049c
CODE_OF_CONDUCT ( #302 )
...
Create CODE_OF_CONDUCT.md
2020-08-26 11:15:02 -07:00
Ben Langmuir
3bb1a1b06e
Merge pull request #301 from benlangmuir/warning-nil-strerror
...
[gardening] Fix warning about strerror return value
swift-DEVELOPMENT-SNAPSHOT-2020-08-18-a
swift-DEVELOPMENT-SNAPSHOT-2020-08-11-a
swift-DEVELOPMENT-SNAPSHOT-2020-08-07-a
2020-08-05 15:20:14 -07:00
Ben Langmuir
f50ce7adc1
[gardening] Fix warning about strerror return value
...
strerror should never return nil, and in the worst case it's already in
a fatalError. Fix the warning about converting an optional value to a
string.
2020-08-05 13:40:55 -07:00
Ben Langmuir
2852ce32ca
Merge pull request #300 from benlangmuir/cancel-error-log
...
[logging] Avoid logging cancellation as warnings/errors
swift-DEVELOPMENT-SNAPSHOT-2020-08-04-a
2020-08-04 11:43:51 -07:00
Ben Langmuir
d82c52c003
[logging] Avoid logging cancellation as warnings/errors
...
Cancellation shows up as an error code, but it is not a real error, so
don't log it like one.
https://bugs.swift.org/browse/SR-13344
2020-08-04 10:04:21 -07:00
Ben Langmuir
4fcf071bc3
Merge pull request #299 from apple/swiftpm-config
...
[SKSwiftPMWorkspace] Set swiftpm config file when creating Workspace
2020-08-03 09:08:01 -07:00