Skip to content

Commit 375ca59

Browse files
committed
Add documentation about what a diagnose bundle contains
1 parent a4ab8c4 commit 375ca59

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Documentation/Diagnose Bundle.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Diagnose Bundle
2+
3+
The diagnose bundle is generated by the `sourcekit-lsp` diagnose command. It’s designed to contain to help SourceKit-LSP developers can diagnose and fix issues a user reports. The information in the diagnose bundle should be human readable so that users generating the bundle can determine whether they are willing to share the collected information with SourceKit-LSP developers.
4+
5+
The diagnose bundle contains the following information:
6+
- Crash logs from SourceKit
7+
- From Xcode toolchains, just a stack trace.
8+
- For assert compilers (ie. nightly toolchains) also sometimes some source code that was currently compiled to cause the crash.
9+
- Log messages emitted by SourceKit
10+
- We mark all information that may contain private information (source code, file names, …) as private in os_log so by default all of that will be redacted. Private logging can be enabled for SourceKit-LSP on macOS by running `sudo log config --subsystem org.swift.sourcekit-lsp --mode private_data:on`. These log messages are also included in a sysdiagnose.
11+
- On Linux and Windows, we currently don’t redact the private information, so users should always explicitly be asked before sharing these logs.
12+
- Versions of Swift installed on your system
13+
- We don’t consider this private information
14+
- If possible, a minimized project that caused SourceKit to crash
15+
- If possible, a minimized project that caused the Swift compiler to crash
16+
- Both minimized projects contain user code and are thus considered private. Hence we need to explicitly prompt the user before sharing this information.
17+
- As a future direction, it could be possible to remove any private information from the reduced examples by removing all comments and replacing all identifiers by obfuscated names.

0 commit comments

Comments
 (0)