Alex Hoppen
024efc2fa1
Remove dependency from SourceKitLSP on swift-docc-symbolkit
...
This way all dependencies on the `docc` libraries are wrapped inside the `DocCDocumentation` module.
2025-04-23 18:54:45 +02:00
Alex Hoppen
bbbc93ea01
Refactor cursorInfoFromDisk to share the underlying logic of invoking cursor info
2025-04-23 18:54:42 +02:00
Matthew Bastien
4fb5323bd4
add cursorInfoFromDisk() to SwiftLanguageService
2025-04-22 15:14:36 -04:00
Matthew Bastien
3610593a00
remove closeDocument(uri:) from TestSourceKitLSPClient
2025-04-17 13:46:03 -04:00
Matthew Bastien
2ae2e709b3
add LRUCache struct to SKUtilities
2025-04-17 13:46:01 -04:00
Matthew Bastien
c24f92d73e
add documentation for certain functions
2025-04-16 15:13:04 -04:00
Matthew Bastien
c37c596562
fix newline matching
2025-04-16 14:54:55 -04:00
Matthew Bastien
131c8113d5
add logging to SwiftLanguageService.doccDocumentation(_:)
2025-04-16 14:54:55 -04:00
Matthew Bastien
1c65bda727
remove some nesting levels in DocumentationLanguageService.doccDocumentation(_:)
2025-04-16 14:54:55 -04:00
Matthew Bastien
9cdd1ac517
simplify logic for CheckedIndex.primaryDefinitionOrDeclarationOccurrence(ofDocCSymbolLink:)
2025-04-16 14:44:14 -04:00
Matthew Bastien
01517746ec
simplify logic for DocCSymbolInformation.matches(_:)
2025-04-16 14:44:13 -04:00
Matthew Bastien
1de68c5298
add logging to DocCReferenceResolutionService
2025-04-16 14:44:13 -04:00
Matthew Bastien
f77e323ad6
update invalidation logic for DocC catalogs
2025-04-16 14:44:13 -04:00
Matthew Bastien
b9e93f7551
add logging of failure cases to DocCCatalogIndexManager
2025-04-16 14:44:13 -04:00
Matthew Bastien
c1895c3b9f
add logging to BuildSystemIntegrationExtensions
2025-04-16 14:44:13 -04:00
Matthew Bastien
0e05bca76c
remove isHeader from SourceKitSourceItemData
2025-04-16 14:44:13 -04:00
Matthew Bastien
0ea0e00c55
use LinkCompletionTools to parse SwiftDocC symbol links
2025-04-16 14:44:13 -04:00
Matthew Bastien
4e06c36c70
organize imports
2025-04-16 14:44:13 -04:00
Matthew Bastien
8c15e27959
use a helper document in cursorInfo()
2025-04-16 14:44:12 -04:00
Matthew Bastien
909e63961e
add missing copyright header
2025-04-16 14:44:12 -04:00
Matthew Bastien
f6f1cb33ea
remove public access modifiers from package symbols
2025-04-16 14:44:12 -04:00
Matthew Bastien
3709e40671
adjust position markers in tests
2025-04-16 14:44:12 -04:00
Matthew Bastien
1ca1441054
fix some review comments
2025-04-16 14:44:12 -04:00
Matthew Bastien
0adaf2581f
more robust searching for DocC catalogs
2025-04-16 14:44:12 -04:00
Matthew Bastien
a8eae3c6d8
remove protocols from DocCDocumentation module
2025-04-16 14:44:12 -04:00
Matthew Bastien
c1a6e65efd
add CMake build to DocCDocumentation module
2025-04-16 14:44:11 -04:00
Matthew Bastien
49b3f531eb
move SwiftDocC related functionality into its own module
2025-04-16 14:44:11 -04:00
Matthew Bastien
24118ebc78
cleanup unused code
2025-04-16 14:44:11 -04:00
Matthew Bastien
39bf4852b0
handle Markdown and Tutorial files in textDocument/doccDocumentation
2025-04-16 14:44:11 -04:00
Doug Gregor
12dc0483e3
Merge pull request #2113 from DougGregor/improve-educational-notes-test
...
Improve educational-notes test
2025-04-16 11:41:35 -07:00
Doug Gregor
b0991df44d
Improve educational-notes test
2025-04-15 21:32:29 -07:00
Doug Gregor
2c1b8595df
Merge pull request #2112 from DougGregor/educational-notes-diags-generalization
...
Generalize educational notes documentation test to not require the ".…md" suffix
2025-04-15 15:37:59 -07:00
Doug Gregor
bf1c0fa11e
Generalize educational notes documentation test to not require the ".md" suffix
2025-04-15 11:03:31 -07:00
Alex Hoppen
6a8ea4cd97
Merge pull request #2105 from ahoppen/test-timeout-cancellation
...
Fix issue that caused request cancellation after a timeout in tests to not work
swift-DEVELOPMENT-SNAPSHOT-2025-04-12-a
2025-04-09 15:23:28 -07:00
Alex Hoppen
af2767703e
Merge pull request #2106 from ahoppen/require-61
...
Require Swift 6.1 to build SourceKit-LSP
2025-04-09 13:20:10 -07:00
Alex Hoppen
79dde81bbf
Merge pull request #2107 from kateinoigakukun/yt/remove-default-wasi-sysroot-test
...
Remove test for default Swift SDK selection for WASI
2025-04-09 08:34:39 -07:00
Yuta Saito
541cbcade8
Remove test for default Swift SDK selection for WASI
...
After https://github.com/swiftlang/swift-package-manager/pull/8468 , we
no longer support wasi-sysroot embedded in the Swift toolchain, so the
test no longer makes sense.
2025-04-09 06:34:50 +00:00
Alex Hoppen
705ae0d699
Require Swift 6.1 to build SourceKit-LSP
...
Now that Swift 6.1 has been released, we no longer need to support building SourceKit-LSP using Swift 6.1.
2025-04-08 16:09:16 -07:00
Alex Hoppen
161eea30f0
Merge pull request #2095 from bripeticca/swiftpmapi/fiximport
...
Update import on SwiftPM PackageModel for `SwiftPMBuildSystem.swift`
2025-04-08 12:03:04 -07:00
Alex Hoppen
167608c787
Merge pull request #2104 from ahoppen/empty-diags-if-cancelled-robust
...
Fix a race condition that can cause `testDontReturnEmptyDiagnosticsIfDiagnosticRequestIsCancelled` to fail
2025-04-08 10:00:26 -07:00
Alex Hoppen
c04518241d
Fix issue that caused request cancellation after a timeout in tests to not work
...
We were calling `server.handle(notification:)`, which called directly into `SourceKitLSPServer` but request handling is implemented in `QueueBasedMessageHandler.handle(_:)`. Call that to ensure that we actually cancel requests after the test timeout.
2025-04-07 18:28:41 -07:00
Alex Hoppen
e045ad5ecf
Fix a race condition that can cause testDontReturnEmptyDiagnosticsIfDiagnosticRequestIsCancelled to fail
...
`testDontReturnEmptyDiagnosticsIfDiagnosticRequestIsCancelled` assumed that cancelling the request cancels the target preparation but that is not true. If we only handle the request cancellation after we started preparing the target, the test would time out.
The only reason why we had the target preparation wait in here was to ensure that we cannot finish the request handling before the request cancellation gets handled. We can achieve a similar result by using an example that is hard to typecheck.
rdar://148654514
2025-04-07 18:26:07 -07:00
Ben Barham
67a16e6d9c
Merge pull request #2101 from finagolfin/droid
...
[build-script-helper] Remove unneeded flags for Android
2025-04-03 12:48:30 -07:00
Finagolfin
01834589e0
[build-script-helper] Remove unneeded flags for Android
...
Removing the definition of `_GNU_SOURCE` is no longer needed since
swiftlang/swift-tools-support-core#500 made sure the right `strerror_r()` is used.
2025-04-02 02:53:20 +05:30
Alex Hoppen
254b42a406
Merge pull request #2098 from ahoppen/swift-format-crashing
...
Don’t crash SourceKit-LSP if swift-format crashes while we write the source file to stdin
2025-03-28 14:17:51 -07:00
Alex Hoppen
24f361cda2
Merge pull request #2093 from ahoppen/remove-dynamically-loaded-sourcekitd
...
Remove the split between `SourceKitD` and `DynamicallyLoadedSourceKitD`
2025-03-28 14:17:27 -07:00
Alex Hoppen
db981d9141
Merge pull request #2097 from ahoppen/request-handling-in-order
...
Fix a race condition leading to out-of-order notifications in tests
swift-DEVELOPMENT-SNAPSHOT-2025-03-28-a
2025-03-28 09:10:12 -07:00
Alex Hoppen
f3daf21802
Don’t crash SourceKit-LSP if swift-format crashes while we write the source file to stdin
...
When swift-format crashes before we send all data to its stdin, we get a SIGPIPE when trying to write more data to its studio on Linux. This, in turn, takes SourceKit-LSP down.
Do the same trick that we do when launching `JSONRPCConnection` of disabling SIGPIPE globally if we can’t disable it for individual pipes.
rdar://147665695
2025-03-27 21:47:33 -07:00
Alex Hoppen
bfd4ef6de9
Merge pull request #2090 from ahoppen/prioritychangedhandler
...
Fix theoretical issue in `withTaskPriorityChangedHandler` that could always report a priority change to `high`
2025-03-27 20:45:37 -07:00
Alex Hoppen
a151ca413c
Fix a race condition leading to out-of-order notifications in tests
...
`TestSourceKitLSPClient.handle` created a new `Task`. This means that we could swap the order of notifications received from SourceKit-LSP. In most cases this doesn’t matter but `BackgroundIndexingTests.testProduceIndexLogWithTaskID` checks that the notification to start a structured log is received before the first report, which might not be the case because of the `Task` here.
Change `PendingNotifications` to a class with a `ThreadSafeBox` to remove the need for a `Task`.
rdar://147814254
2025-03-27 15:15:11 -07:00