Max Desiatov
73be53785c
Merge branch 'main' into maxd/support-version-option
2025-01-13 15:17:50 +00:00
Alex Hoppen
81fe78622b
Merge pull request #1917 from ahoppen/linkfilelist-set
...
Change `linkFileList` to be a `Set`
2025-01-10 23:10:55 +01:00
Alex Hoppen
8ac1beec86
Merge pull request #1899 from iMostfa/feat/support-range-in-hover
...
feat: Support range in `textDocument/hover`
2025-01-10 21:57:15 +01:00
Alex Hoppen
13068d5cef
Change linkFileList to be a Set
2025-01-10 19:04:39 +01:00
Alex Hoppen
db553c605a
Merge pull request #1916 from ahoppen/only-link-linkfilelist
...
In macro tests, only link against files listed in `Objects.LinkFileList`
swift-DEVELOPMENT-SNAPSHOT-2025-01-10-a
2025-01-10 19:02:45 +01:00
iMostafa
f2978b0491
Adjust tokenRange
2025-01-10 13:26:21 +02:00
Alex Hoppen
7327c09a72
In macro tests, only link against files listed in Objects.LinkFileList
...
Otherwise we can get a situation where a `.swift` file is removed from swift-syntax, its `.o` file is still in the build directory because the build folder wasn't cleaned and thus we would link against the stale `.o` file.
rdar://142666044
2025-01-10 10:07:34 +01:00
Alex Hoppen
194d340c6b
Merge pull request #1914 from ahoppen/retry-updating-headerh
...
Retry updating `Header.h` in `testBackgroundIndexingReindexesHeader`
2025-01-10 09:28:36 +01:00
Alex Hoppen
d566e2b690
Retry updating Header.h in testBackgroundIndexingReindexesHeader
...
This fixes a nondeterministic test failure on Windows.
2025-01-09 22:52:45 +01:00
Alex Hoppen
48389c75a2
Merge pull request #1912 from ahoppen/reduce-swiftpm-dependency
...
Support building SourceKit-LSP without a dependency on SwiftPM
2025-01-09 13:10:44 +01:00
iMostafa
a1a8755a1a
Update tests and formatting
2025-01-09 01:30:12 +02:00
Alex Hoppen
5326852ea8
Support building SourceKit-LSP without a dependency on SwiftPM
2025-01-08 13:13:31 +01:00
Alex Hoppen
718c0ee809
Remove imports of SwiftPM modules that are not strictly necessary
2025-01-08 12:43:43 +01:00
Alex Hoppen
17e2db073c
Merge pull request #1909 from ahoppen/cache-container-names
...
Cache container names in `CheckedIndex`
2025-01-08 09:37:30 +01:00
Alex Hoppen
5b9b53104d
Use forEachSymbolOccurrence to find parent container symbol
...
This improves performance when searching for `only` in SourceKit-LSP by ~30%.
2025-01-06 13:07:35 +01:00
Alex Hoppen
970c5a564f
Correctly compute container names for extensions
2025-01-06 12:26:55 +01:00
Alex Hoppen
991b8933bc
Merge pull request #1907 from ahoppen/remove-unused-method
...
Remove `SourceKitLSPServer.openGeneratedInterface`
swift-DEVELOPMENT-SNAPSHOT-2025-01-04-a
swift-DEVELOPMENT-SNAPSHOT-2025-01-05-a
2025-01-04 09:23:40 +01:00
Alex Hoppen
2a0902bb20
Cache container names in CheckedIndex
...
It is important that we cache this because we might find a lot of symbols in the same container for eg. workspace symbols (eg. consider many symbols in the same C++ namespace). If we didn't cache this value, then we would need to perform a `primaryDefinitionOrDeclarationOccurrence` lookup for all of these containers, which is expensive.
For example, searching for `only` in SourceKit-LSP’s codebase used to not return results in more than 20s (after which I gave up) and now returns >8000 results in <2s.
rdar://141412138
2025-01-03 16:00:22 +01:00
Alex Hoppen
c214a5fdb1
Merge pull request #1905 from ahoppen/output-mirror
...
Add option to generate an output mirror file that contains the exact data sent from SourceKit-LSP to the client
2025-01-03 15:11:52 +01:00
Alex Hoppen
2f53e7cf16
Remove SourceKitLSPServer.openGeneratedInterface
...
The method was never called.
2025-01-03 15:09:40 +01:00
Alex Hoppen
f653ef3255
Merge pull request #1887 from ahoppen/generated-interface-reference-document
...
Support semantic functionality in generated interfaces if the client supports `getReferenceDocument`
2025-01-03 14:35:01 +01:00
Rintaro Ishizaki
233f2e6f37
Merge pull request #1901 from rintaro/macros-link-cshims
...
[Test] Link macro binaries to _SwiftSyntaxCShims objects
swift-DEVELOPMENT-SNAPSHOT-2025-01-03-a
2025-01-02 15:28:00 -08:00
Alex Hoppen
8d73731bcb
Support semantic functionality in generated interfaces if the client supports getReferenceDocument
...
This allows us to provide semantic functionality inside the generated interfaces, such as hover or jump-to-definition.
rdar://125663597
2025-01-02 20:29:36 +01:00
Alex Hoppen
5330795404
Add option to generate an output mirror file that contains the exact data sent from SourceKit-LSP to the client
...
This could help us debug low-level issues of SourceKit-LSP to client communication such as https://github.com/swiftlang/sourcekit-lsp/issues/1890 .
2025-01-02 19:12:50 +01:00
Alex Hoppen
320177ff85
Merge pull request #1902 from ahoppen/clear-in-progress-on-queue
...
Clear `inProgressTextDocumentRequests` on `textDocumentTrackingQueue`
2025-01-02 18:40:11 +01:00
Alex Hoppen
3f085600ef
Merge pull request #1903 from ahoppen/macro-highlighting
...
Add semantic highlighting for macros
2025-01-02 18:40:01 +01:00
Alex Hoppen
a30385afa5
Merge pull request #1904 from ahoppen/log-cancellation
...
Emit a log message when we receive a cancel request notification
2025-01-02 18:39:53 +01:00
Alex Hoppen
7b43383260
Emit a log message when we receive a cancel request notification
2025-01-02 14:17:23 +01:00
Alex Hoppen
4303e44fcb
Add semantic highlighting for macros
2025-01-02 13:25:58 +01:00
Alex Hoppen
e59df13bb0
Clear inProgressTextDocumentRequests on textDocumentTrackingQueue
...
`inProgressTextDocumentRequests` is supposed to only be accessed on `textDocumentTrackingQueue` but we were accessing it outside of that queue. Because of this, we might try to remove requests from `inProgressTextDocumentRequests` before adding them, which would cause them to stay in the list indefinitely.
2025-01-02 13:23:18 +01:00
iMostafa
5caf17c156
Update formatting in tests
2025-01-02 13:27:55 +02:00
Alex Hoppen
ede40883f5
Merge pull request #1898 from Kila2/feature/config-build-settings-timeout
...
feature support override buildSettingsTimeout by workspace config.json
swift-DEVELOPMENT-SNAPSHOT-2025-01-02-a
2025-01-02 09:40:20 +01:00
Alex Hoppen
50793f682f
Merge pull request #1895 from Kila2/main
...
fix ASTBuild command exec failed
2025-01-02 09:39:45 +01:00
Rintaro Ishizaki
6e23a8f0df
[Test] Link macro binaries to _SwiftSyntaxCShims objects
...
`_SwiftSyntaxCShims` objects weren't linked because it was a header-only
library. But since actual code is being added, we need to link it.
2025-01-01 10:07:40 -08:00
iMostafa
fb4ed6510e
Support Range when hovering
...
By getting the token at hovering position, then get the token
position.
2024-12-30 12:26:40 +02:00
lijunliang.9819
cf58f14215
feature support override buildSettingsTimeout by workspace config.json
2024-12-23 11:30:18 +08:00
Alex Hoppen
e93b7ed6bf
Merge pull request #1849 from kateinoigakukun/katei/json-schema
swift-DEVELOPMENT-SNAPSHOT-2024-12-22-a
2024-12-20 10:01:06 +01:00
lijunliang.9819
4987a40359
fix ASTBuild command exec failed
2024-12-20 16:55:18 +08:00
Saleem Abdulrasool
17c06340bb
build: wire in LMDB for IndexStoreDB dependency
...
This adjusts the build configuration to allow the shared LMDB library
build to be wired into the build.
swift-DEVELOPMENT-SNAPSHOT-2024-12-19-a
2024-12-18 10:05:24 -08:00
Yuta Saito
6803d8c4da
Address code style feedbacks
2024-12-15 14:29:53 +09:00
Alex Hoppen
1cd010db98
Merge pull request #1888 from ahoppen/indexstore-relative-compdb
...
Interpret the `-index-store-path` relative to the command’s directory
swift-DEVELOPMENT-SNAPSHOT-2024-12-16-a
2024-12-13 23:47:50 +01:00
Alex Hoppen
bb1314703a
Merge pull request #1885 from ahoppen/check-invalid-package-version
...
Check that we get correct package version even if package manifest is invalid
2024-12-13 20:12:21 +01:00
Alex Hoppen
97711388d0
Merge pull request #1886 from ahoppen/sourcekitd-request-diagnostics
...
When a sourcekitd diagnostics request fails, show the request error as a diagnostic on the source file
2024-12-13 19:42:05 +01:00
Alex Hoppen
b07044d25d
Interpret the -index-store-path relative to the command’s directory
...
Fixes #1856
rdar://141004197
2024-12-13 18:35:13 +01:00
Alex Hoppen
a54c709425
When a sourcekitd diagnostics request fails, show the request error as a diagnostic on the source file
...
The missing diagnostics might be due to an error that the user can fix. Report it to them.
Fixes #1812
rdar://139514623
2024-12-12 16:32:33 -08:00
Alex Hoppen
8afacd7d7e
Check that we get correct package version even if package manifest is invalid
...
Addresses https://github.com/swiftlang/sourcekit-lsp/pull/1846/files#r1856529041
rdar://141311942
2024-12-12 16:09:23 -08:00
Alex Hoppen
9a1c75e883
Merge pull request #1882 from ahoppen/windows-immediate-exit
...
Fix an error that causes SourceKit-LSP to exit immediately on Windows
swift-DEVELOPMENT-SNAPSHOT-2024-12-13-a
2024-12-12 14:25:00 -08:00
Alex Hoppen
e0901f0600
Merge pull request #1880 from ahoppen/normalize-drive-letter
...
Normalize Windows drive letter to be uppercase
2024-12-12 10:45:59 -08:00
Alex Hoppen
e6b8e07b86
Fix an error that causes SourceKit-LSP to exit immediately on Windows
...
For reasons that are completely oblivious to me, `DispatchIO.write`, which is used to write LSP responses to stdout fails with error code 5 on Windows unless we call `AbsolutePath(validating:)` on some URL first.
2024-12-11 10:39:17 -08:00
Alex Hoppen
ec461d68d6
Merge pull request #1865 from ahoppen/source-files-performance
...
Improve performance of `sourceFilesAndDirectories`
swift-DEVELOPMENT-SNAPSHOT-2024-12-12-a
2024-12-11 10:05:57 -08:00