Skip to content

Merge main into release/6.0 #1426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 133 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
2c40757
Change static method `DocumentURI.for(_:testName:)` to an initializer…
lokesh-tr May 24, 2024
48afb11
Merge branch 'apple:main' into change-static-method-documenturi-for-t…
lokesh-tr May 25, 2024
a858d30
Address review comments on #1329
ahoppen May 24, 2024
9098e09
Address review comments from #1322
ahoppen May 24, 2024
1571b89
Merge branch 'apple:main' into change-static-method-documenturi-for-t…
lokesh-tr May 27, 2024
5e55203
Switch most tests to use background indexing instead of building the …
ahoppen May 25, 2024
1b914a7
Fix a memory leak in `BackgroundIndexingTests.testPrepareTargetAfterE…
ahoppen May 28, 2024
715796f
Merge pull request #1348 from lokesh-tr/change-static-method-document…
ahoppen May 28, 2024
e87d9e8
Show message if background indexing is enabled but the workspace does…
ahoppen May 25, 2024
0f86e01
Merge pull request #1349 from ahoppen/address-review-comments-1322-1329
ahoppen May 29, 2024
7a1324d
Merge pull request #1362 from ahoppen/test-memory-leak
ahoppen May 29, 2024
c2bf81c
Merge pull request #1360 from ahoppen/show-background-indexing-not-su…
ahoppen May 29, 2024
9677a00
Add paths from compiler arguments spelled with `=` to the diagnose bu…
ahoppen May 28, 2024
087ea64
Rename `note` to `notification` throughout the codebase wherever nece…
lokesh-tr May 25, 2024
1a45220
Fixed minor formatting issues
lokesh-tr May 29, 2024
129d3a4
Move Swift compiler version parsing from `SkipUnless.swift` to `Toolc…
ahoppen May 29, 2024
48df054
Support running tests that require building with a Swift 5.10 toolchain
ahoppen May 29, 2024
83f8287
Merge pull request #1353 from lokesh-tr/rename-note-to-notification-w…
ahoppen May 29, 2024
f3efac4
Relax assertion around `testIntegrationTest`
ahoppen May 29, 2024
6dabb1b
Fix a negation issue in the type of log message sent to the index log
ahoppen May 29, 2024
942bb0a
Merge pull request #1366 from ahoppen/fix-modules-include-directory
ahoppen May 30, 2024
25194f4
Merge pull request #1368 from ahoppen/robust-integration-test
ahoppen May 30, 2024
3c687eb
Merge pull request #1369 from ahoppen/flip-index-log-type
ahoppen May 30, 2024
a6786cd
Merge pull request #1358 from ahoppen/switch-test-to-background-indexing
ahoppen May 30, 2024
b7b225c
Merge pull request #1365 from ahoppen/modulemap-in-diagnose-bundle
ahoppen May 30, 2024
12b848e
[SwiftPMBuildSystem] Adjust `BuildParameters` use to indicate a desti…
xedin May 28, 2024
6d4953b
Make tests pass with Xcode 15.4
ahoppen May 31, 2024
094eb0c
Relax `testMainFileChangesIfIncludeIsAdded` to allow `clangd` to retu…
ahoppen May 31, 2024
d439d12
Merge pull request #1361 from xedin/buildplan-parameter-split
xedin May 31, 2024
1f0dde6
Log targets marked out-of-date
ahoppen May 31, 2024
6e952f9
Use default toolchain in `sourcekit-lsp run-sourcekitd-request` if no…
ahoppen May 31, 2024
e2f6f5d
Flush stdout after issuing message that we re-run tests in serial
ahoppen May 31, 2024
6124c9d
Replace an assertion by a fault log in `WorkDoneProgressState`
ahoppen May 31, 2024
58d448a
Create all notification/request handling signposts in the same loggin…
ahoppen May 31, 2024
01e8858
Don’t show a “Preparing current file” progress while determining targ…
ahoppen May 31, 2024
2beae82
Don’t catch `CancellationError` for document diagnostics
ahoppen May 31, 2024
2da283b
Fix two cases where we weren’t cleaning up test scratch directories
ahoppen May 31, 2024
56f76c3
Merge pull request #1374 from ahoppen/log-targets-invalidated
ahoppen May 31, 2024
899d857
Merge pull request #1375 from ahoppen/infer-sourcekitd-in-run-sourcek…
ahoppen May 31, 2024
37480a6
Merge pull request #1376 from ahoppen/flush-stdout-before-serial-test…
ahoppen May 31, 2024
403f550
Merge pull request #1372 from ahoppen/clangd-may-not-return-up-to-dat…
ahoppen May 31, 2024
6206d2a
Merge pull request #1378 from ahoppen/message-handling-signposts-in-s…
ahoppen May 31, 2024
e011829
Merge pull request #1379 from ahoppen/no-prepare-for-editor-task-whil…
ahoppen May 31, 2024
b08895b
Add a few more arguments to allow errors during indexing
ahoppen May 31, 2024
0b6ad27
Merge pull request #1371 from ahoppen/tests-pass-on-released-xcode
ahoppen May 31, 2024
c8e1eab
Merge pull request #1377 from ahoppen/fault-instead-of-assert-in-work…
ahoppen May 31, 2024
505f4cf
Merge pull request #1383 from ahoppen/clean-up
ahoppen May 31, 2024
b7a502c
When SwiftPM supports `--experimental-prepare-for-indexing` pass it t…
ahoppen May 31, 2024
2da648e
Improve folding ranges if editor only supports line folding
ahoppen May 31, 2024
02576d6
Change `QueuedTask.cancelledToBeRescheduled` to be a normal Bool inst…
ahoppen May 31, 2024
cc1280f
Don’t start executing a task when `cancelToBeRescheduled` is called b…
ahoppen May 31, 2024
1ee4141
Merge pull request #1373 from ahoppen/enable-prepare-for-indexing-if-…
ahoppen Jun 1, 2024
44c60a2
Merge pull request #1384 from ahoppen/allow-modules-with-errors-when-…
ahoppen Jun 1, 2024
0ee2405
Merge pull request #1370 from ahoppen/cancel-task-before-execution-st…
ahoppen Jun 1, 2024
936b5b2
Merge pull request #1381 from ahoppen/dont-catch-cancellation-error-f…
ahoppen Jun 1, 2024
045024d
Merge pull request #1385 from ahoppen/improve-line-folding
ahoppen Jun 1, 2024
6599292
Add infrastructure to write tests for Swift macros
ahoppen May 29, 2024
e56c71f
Don’t run a `swift build` command to prepare a package manifest
ahoppen May 31, 2024
f51aa65
Forward all errors that translate to `.cancelled` from document diagn…
ahoppen Jun 1, 2024
20840c4
Skip testImportPreparedModuleWithFunctionBodiesSkipped if toolchain d…
ahoppen Jun 1, 2024
4524e6b
Set `SOURCEKITLSP_FORCE_NON_DARWIN_LOGGER` for parallel test execution
ahoppen Jun 1, 2024
be10867
Merge pull request #1386 from ahoppen/fix-diagnostic-cancelled-test-f…
ahoppen Jun 1, 2024
d6a72ef
Merge pull request #1387 from ahoppen/test-pass-with-xcode-15-4
ahoppen Jun 1, 2024
98718d4
Merge pull request #1367 from ahoppen/macro-test-project
ahoppen Jun 1, 2024
eb304c4
Add a general notion of experimental features to sourcekit-lsp
ahoppen Jun 1, 2024
4b2ee40
Automatically add `swift-tools-version` and `import PackageDescriptio…
ahoppen Jun 1, 2024
113bd0d
Move syntactic XCTest scanner to a separate file
ahoppen Jun 1, 2024
2db4259
Mark closures of `CheckedIndex.forEach*` as non-escaping
ahoppen Jun 1, 2024
80c214b
Change `CheckedIndex` to use `DocumentURI` instead of `URL`
ahoppen Jun 1, 2024
f84cfec
Make `CompilationDatabase` use `DocumentURI` instead of `URL`
ahoppen Jun 1, 2024
d8f988b
Merge pull request #1380 from ahoppen/dont-prepare-pacakge-manifest
ahoppen Jun 1, 2024
532a37b
Show container name in call hierarchy item name instead of detail field
ahoppen Jun 1, 2024
68af33e
Show `deinit` in document symbols
ahoppen Jun 2, 2024
c44ee45
Add an extension to the LogMessageNotification to add a message to a …
ahoppen Jun 2, 2024
ef8b4f5
Move debug subcommands of sourcekit-lsp to a `debug` subcommand and u…
ahoppen Jun 2, 2024
2258a6c
Merge pull request #1389 from ahoppen/experimental-features
ahoppen Jun 2, 2024
ae89f4f
Merge pull request #1391 from ahoppen/shorten-test-package-manifests
ahoppen Jun 2, 2024
1fbb65e
Merge pull request #1392 from ahoppen/move-xctest-scanner
ahoppen Jun 2, 2024
175e85e
Merge pull request #1398 from ahoppen/separate-index-log-in-client
ahoppen Jun 2, 2024
0e0594b
Merge pull request #1399 from ahoppen/debug-subcommand
ahoppen Jun 2, 2024
c4e6e85
Show “Preparing targets” as index status if we only have preparation …
ahoppen Jun 2, 2024
7066784
Don’t require `--experimental-feature` to be passed when launching `s…
ahoppen Jun 2, 2024
0465e82
Merge pull request #1402 from ahoppen/experimental-features-optional
ahoppen Jun 2, 2024
9bddc7f
Merge pull request #1400 from ahoppen/preparing-targets-index-status
ahoppen Jun 3, 2024
05d9d63
Merge pull request #1393 from ahoppen/index-foreach-non-escaping
ahoppen Jun 3, 2024
b3fab6b
Remove `showActivePreparationTasksInProgress` experimental feature
ahoppen Jun 2, 2024
14775e8
Merge pull request #1401 from ahoppen/remove-show-active-tasks-in-pro…
ahoppen Jun 3, 2024
59672e9
Log when a sourcekitd request gets cancelled
ahoppen Jun 3, 2024
63c1442
Set the logging scope for notification handling one level higher so i…
ahoppen Jun 3, 2024
f91b63f
Set experimental features from the command line in `SourceKitLSPServe…
ahoppen Jun 3, 2024
9388caf
Merge pull request #1396 from ahoppen/container-in-call-hierarchy-name
ahoppen Jun 3, 2024
b9c7438
Merge pull request #1397 from ahoppen/deinit-in-document-symbols
ahoppen Jun 3, 2024
c639d2b
Classify deinitializers as constructors in document symbols
ahoppen Jun 3, 2024
259d49e
Share module cache between test projects
ahoppen Jun 2, 2024
b2b3836
Fix a typo
ahoppen Jun 3, 2024
c7bf59e
Require `ThreadSafeBox.T` to be Sendable
ahoppen Jun 1, 2024
5bae953
Merge pull request #1388 from ahoppen/non-darwin-logger-parallel-tests
ahoppen Jun 3, 2024
9d970e4
Merge pull request #1405 from ahoppen/request-cancellation-logging
ahoppen Jun 3, 2024
b60acde
Merge pull request #1406 from ahoppen/cancellation-logging-scope
ahoppen Jun 3, 2024
af37a84
Merge pull request #1407 from ahoppen/set-experimental-features
ahoppen Jun 3, 2024
3c5d8b9
Change `SwiftPMBuildSystem` to use `DocumentURI` instead of `URL`
ahoppen Jun 1, 2024
c03d80d
Migrate `Rename.swift` to use `DocumentURI` instead of `URL`
ahoppen Jun 1, 2024
1ce51eb
A few miscellaneous changes
ahoppen Jun 1, 2024
1438c79
Merge pull request #1408 from ahoppen/deinit-symbol-kind
ahoppen Jun 3, 2024
d806163
Merge pull request #1403 from ahoppen/share-test-module-cache
ahoppen Jun 3, 2024
3b68f15
Merge pull request #1394 from ahoppen/thread-safe-box-sendable
ahoppen Jun 3, 2024
09ad77b
Instead of sending a message to the index log when an indexing task f…
ahoppen May 31, 2024
2b488a9
Merge pull request #1409 from ahoppen/fix-typo
ahoppen Jun 3, 2024
f203b3a
Merge pull request #1395 from ahoppen/uri-everywhere
ahoppen Jun 3, 2024
f98da77
Make passing `--experimental-prepare-for-indexing` to `swift build` a…
ahoppen Jun 3, 2024
d04bf84
Don’t cancel in-progress diagnostic generation when calling `Diagnost…
ahoppen Jun 4, 2024
5b119b7
Add tests to rename C++ symbols exposed to Swift
ahoppen Jun 2, 2024
b7fa9a9
Merge pull request #1413 from ahoppen/prepare-experimental-feature
ahoppen Jun 4, 2024
fff9eb5
Merge pull request #1382 from ahoppen/stream-index-log
ahoppen Jun 4, 2024
e4d8331
Merge pull request #1404 from ahoppen/cpp-to-swift-rename-tests
ahoppen Jun 4, 2024
32852af
Demote two log messages issued on the `error` level
ahoppen Jun 4, 2024
b479b2e
Create a `SwiftExtensions` module
ahoppen Jun 3, 2024
560d3e9
Merge pull request #1414 from ahoppen/no-cancel-if-removing-diag-from…
ahoppen Jun 4, 2024
1553c9c
Don’t index files with fallback build settings
ahoppen Jun 4, 2024
ece8634
Keep track of recently finished requests
ahoppen Jun 4, 2024
cf48252
Log when the 10 year wait that’s parking the main thread expires for …
ahoppen Jun 4, 2024
922d94b
Merge pull request #1410 from ahoppen/swift-utilities
ahoppen Jun 4, 2024
d8067fb
Add some more overview documentation documents
ahoppen Jun 4, 2024
6eaa433
Merge pull request #1418 from ahoppen/dont-index-fallback-args
ahoppen Jun 4, 2024
9c13dbb
Merge pull request #1420 from ahoppen/reduce-some-logging
ahoppen Jun 4, 2024
3e11cd6
Unify `withLock` implementations
ahoppen Jun 4, 2024
37e6a8a
Wait for cancellation to propagate in `testDontReturnEmptyDiagnostics…
ahoppen Jun 3, 2024
5ac5b56
Merge pull request #1412 from ahoppen/wait-for-prepration-to-propagate
ahoppen Jun 4, 2024
e73768b
Merge pull request #1417 from ahoppen/one-with-lock
ahoppen Jun 4, 2024
0f55306
Merge pull request #1421 from ahoppen/track-recently-finished-requests
ahoppen Jun 4, 2024
67be113
Merge pull request #1422 from ahoppen/log-park-expired
ahoppen Jun 4, 2024
cec73bb
Merge pull request #1425 from ahoppen/more-docs
ahoppen Jun 4, 2024
11137e1
Merge branch 'main' into 6.0/update-2024-06-04
ahoppen Jun 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"disableTaskQueue": true,
"group": "test",
"label": "Run all tests (parallel)",
"options": {
"env": {
"SOURCEKITLSP_FORCE_NON_DARWIN_LOGGER": "1"
}
},
"problemMatcher": [
"$swiftc"
],
Expand All @@ -30,7 +35,8 @@
"label": "Run fast tests (parallel)",
"options": {
"env": {
"SKIP_LONG_TESTS": "1"
"SKIP_LONG_TESTS": "1",
"SOURCEKITLSP_FORCE_NON_DARWIN_LOGGER": "1"
}
},
"problemMatcher": [
Expand Down
19 changes: 19 additions & 0 deletions Documentation/Environment Variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Environment variables

The following environment variables can be used to control some behavior in SourceKit-LSP

## Build time

- `SOURCEKITLSP_FORCE_NON_DARWIN_LOGGER`: Use the `NonDarwinLogger` to log to stderr, even when building SourceKit-LSP on macOS. This is useful when running tests using `swift test` because it writes the log messages to stderr, which is displayed during the `swift test` invocation.
- `SOURCEKIT_LSP_CI_INSTALL`: Modifies rpaths in a way that’s necessary to build SourceKit-LSP to be included in a distributed toolchain. Should not be used locally.
- `SWIFTCI_USE_LOCAL_DEPS`: Assume that all of SourceKit-LSP’s dependencies are checked out next to it and use those instead of cloning the repositories. Primarily intended for CI environments that check out related branches.

## Runtime

- `SOURCEKITLSP_LOG_LEVEL`: When using `NonDarwinLogger`, specify the level at which messages should be logged. Defaults to `default`. Use `debug` to increase to the highest log level.
- `SOURCEKITLSP_LOG_PRIVACY_LEVEL`: When using `NonDarwinLogger`, specifies whether information that might contain personal information (essentially source code) should be logged. Defaults to `private`, which logs this information. Set to `public` to redact this information.

## Testing
- `SKIP_LONG_TESTS`: Skip tests that typically take more than 1s to execute.
- `SOURCEKITLSP_KEEP_TEST_SCRATCH_DIR`: Does not delete the temporary files created during test execution. Allows inspection of the test projects after the test finishes.
- `SOURCEKIT_LSP_TEST_MODULE_CACHE`: Specifies where tests should store their shared module cache. Defaults to writing the module cache to a temporary directory. Intended so that CI systems can clean the module cache directory after running.
Loading