Skip to content

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

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
Sep 27, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Sep 21, 2024

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

@ahoppen
Copy link
Member Author

ahoppen commented Sep 21, 2024

@swift-ci Please test

@ahoppen ahoppen force-pushed the build-settings-timeout branch from 72e073a to 558ef62 Compare September 21, 2024 14:09
@ahoppen
Copy link
Member Author

ahoppen commented Sep 21, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Sep 21, 2024

@swift-ci Please test Windows

@ahoppen ahoppen force-pushed the build-settings-timeout branch from 558ef62 to 415bba0 Compare September 25, 2024 20:56
@ahoppen ahoppen changed the title Use fallback build settings if build system doesn’t provide build settings within a timeout 🚥 #1689 Use fallback build settings if build system doesn’t provide build settings within a timeout Sep 25, 2024
@ahoppen
Copy link
Member Author

ahoppen commented Sep 25, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Sep 25, 2024

@swift-ci Please test Windows

body: @escaping @Sendable () async throws -> T?,
resultReceivedAfterTimeout: @escaping @Sendable () async -> Void
) async throws -> T? {
let didHitTimeout = AtomicBool(initialValue: false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing seems to set this to true

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thanks for catching that!

…tings within a timeout

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
@ahoppen ahoppen force-pushed the build-settings-timeout branch from 415bba0 to 78217ec Compare September 27, 2024 00:51
@ahoppen
Copy link
Member Author

ahoppen commented Sep 27, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Sep 27, 2024

@swift-ci Please test Windows

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented Sep 27, 2024

@swift-ci Please test Windows

@ahoppen ahoppen merged commit b91f72f into swiftlang:main Sep 27, 2024
3 checks passed
@ahoppen ahoppen deleted the build-settings-timeout branch September 27, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants