Introducing the sourcekitd Stress Tester
Sourcekitd
provides the data backing key editor features like code completion, semantic highlighting, and refactoring for Swift files in both Xcode and the recently announced SourceKit-LSP. To help improve its robustness, we’re introducing a new tool, thesourcekitd
stress tester, that over the past few months has helped find 91 reproduciblesourcekitd
crashes, assertion failures, and hangs. This post covers the stress tester’s implementation, its deployment in Swift’s CI and PR testing, and how Swift developers can run it over their own projects to help improve the Swift editing experience for everyone.
→ swift.org/blog/sourcekitd-stress-tester/
Sourcekitd
powers essential editor features like code completion and refactoring in Xcode and SourceKit-LSP, handling both syntactic and semantic requests for Swift files.
To boost its reliability, a new stress tester tool has been introduced, uncovering 91 crashes, assertions, and hangs by simulating sequences of requests on real-world code from the Swift source compatibility suite.
The tester operates in modes like basic, concurrent, and inside-out rewriting, and integrates with Swift CI for regression and PR testing. Developers can run it on their projects via sk-stress-test
or sk-swiftc-wrapper
to report issues, contributing to a better editing experience for all.
Category:
Tag:
Year: