Skip to content

Migrate to swift-tools-protocols's withTimeout family#2678

Draft
rintaro wants to merge 2 commits into
swiftlang:mainfrom
rintaro:withtimeout-continuation
Draft

Migrate to swift-tools-protocols's withTimeout family#2678
rintaro wants to merge 2 commits into
swiftlang:mainfrom
rintaro:withtimeout-continuation

Conversation

@rintaro
Copy link
Copy Markdown
Member

@rintaro rintaro commented May 29, 2026

Update for swiftlang/swift-tools-protocols#63

Delete Sources/SwiftExtensions/AsyncUtils.swift; the withTimeout / withTimeoutResult implementations now live in swift-tools-protocols.

Also remove the non-throwing withTaskPriorityChangedHandler convenience overload. The upstream version is now rethrows.

@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented May 29, 2026

swiftlang/swift-tools-protocols#63
@swift-ci Please test

@rintaro rintaro marked this pull request as draft May 29, 2026 21:33
The `withTimeout` / `withTimeoutResult` implementations now live in
swift-tools-protocols. Delete the local copies in
`Sources/SwiftExtensions/AsyncUtils.swift`. Also remove the
non-throwing `withTaskPriorityChangedHandler` convenience overload
in `TaskScheduler.swift`; the upstream version is now `rethrows`,
so a non-throwing body works directly.

These are visible via the existing
`@_spi(SourceKitLSP) import ToolsProtocolsSwiftExtensions`.
@rintaro rintaro force-pushed the withtimeout-continuation branch from 3b94401 to 8c2ee11 Compare May 29, 2026 23:27
@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented May 29, 2026

swiftlang/swift-tools-protocols#63
@swift-ci Please test

@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented May 29, 2026

swiftlang/swift-tools-protocols#63
@swift-ci Please test Windows

@rintaro rintaro marked this pull request as ready for review May 29, 2026 23:59
@rintaro rintaro marked this pull request as draft May 30, 2026 02:49
@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented May 30, 2026

swiftlang/swift-tools-protocols#63
@swift-ci Please test

Logs three points to diagnose Linux flakes in
testBackgroundIndexingRunsOnSynchronizeRequestEvenIfPaused where
update-indexstore never starts after preparation finishes:

- when scheduleIndexing reaches the post-preparation withTaskGroup
- when updateIndexStore creates a QueuedTask, with priorities
- when poke() rejects a pending task because of budget

Together these distinguish whether the indexTask body wedged, the
QueuedTask was never created, or priority escalation never fired
poke() to retry.
@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented May 30, 2026

swiftlang/swift-tools-protocols#63
@swift-ci Please test

@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented May 30, 2026

swiftlang/swift-tools-protocols#63
@swift-ci Please test Linux

@rintaro
Copy link
Copy Markdown
Member Author

rintaro commented May 30, 2026

swiftlang/swift-tools-protocols#63
@swift-ci Please test Windows

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.

1 participant