Skip to content

Add documentation about what a diagnose bundle contains #1520

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 1 commit into from
Jun 26, 2024
Merged
Changes from all commits
Commits
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
17 changes: 17 additions & 0 deletions Documentation/Diagnose Bundle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Diagnose Bundle

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.

The diagnose bundle contains the following information:
- Crash logs from SourceKit
- From Xcode toolchains, just a stack trace.
- For assert compilers (ie. nightly toolchains) also sometimes some source code that was currently compiled to cause the crash.
- Log messages emitted by SourceKit
- 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.
- On Linux and Windows, we currently don’t redact the private information, so users should always explicitly be asked before sharing these logs.
- Versions of Swift installed on your system
- We don’t consider this private information
- If possible, a minimized project that caused SourceKit to crash
- If possible, a minimized project that caused the Swift compiler to crash
- Both minimized projects contain user code and are thus considered private. Hence we need to explicitly prompt the user before sharing this information.
- 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.