Skip to content

Commit

Permalink
Merge pull request #1426 from ahoppen/6.0/update-2024-06-04
Browse files Browse the repository at this point in the history
Merge `main` into `release/6.0`
  • Loading branch information
ahoppen committed Jun 5, 2024
2 parents 677487b + 11137e1 commit d71fdea
Show file tree
Hide file tree
Showing 134 changed files with 3,145 additions and 1,445 deletions.
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

0 comments on commit d71fdea

Please sign in to comment.