swiftlang / sourcekit-lsp

Language Server Protocol implementation for Swift and C-based languages
Apache License 2.0
3.33k stars 280 forks source link

Use fallback build settings if build system doesn’t provide build settings within a timeout #1762

Closed ahoppen closed 1 month ago

ahoppen commented 1 month ago

When we receive build settings after hitting the timeout, we call fileBuildSettingsChanged on the delegate, which should cause the document to get re-opened in sourcekitd and diagnostics to get refreshed.

rdar://136332685 Fixes #1693

ahoppen commented 1 month ago

@swift-ci Please test

ahoppen commented 1 month ago

@swift-ci Please test

ahoppen commented 1 month ago

Ran the test suite 20 times locally as-is and 20 times with a 1s delay before getting build settings from the build system. This should rule out any nondeterministic failures.

ahoppen commented 1 month ago

@swift-ci Please test Windows

ahoppen commented 1 month ago

@swift-ci Please test Windows