Repository navigation
feat: show waiting-on details for pending resources - #11
Merged
Merged
Conversation
- Rename PendingBlockerInfo to PendingResourceInfo with richer data - Add WaitingInfo model to track what each resource is waiting on - Display waiting-on resource names and reasons in the menu - Track all pending resources, not just those blocking dependents - Reorder menu sections: failures, updating, waiting
The retry loop would silently freeze when tilt briefly connected then exited. Two root causes: 1. Cooperative thread pool starvation: refreshDependencyGraph() and triggerUpdate() used Task.detached with blocking waitUntilExit() calls. When tilt was unstable, these hung indefinitely, starving the thread pool and preventing Task.sleep continuations from being scheduled. Fix: move to DispatchQueue.global().async. 2. Pipe buffer deadlock: readDataToEndOfFile() was called after waitUntilExit(). If process output exceeded 64KB, the pipe buffer filled, the process blocked on write, and waitUntilExit() waited forever. Fix: read before wait. Additional improvements: - Replace readabilityHandler with FileHandle.bytes.lines to fix a race where the process could exit before the stream was iterated - Add terminationHandler safety net to force-close pipes on exit - Use Task.detached for watch loop to avoid inheriting main actor - Add explicit Task.sleep error handling instead of silent try? - Add timestamped logging for all TiltClient diagnostics - Add stale data clearing with grace period on disconnect - Log Connected state alongside existing Connecting state
Document the recurring pitfalls found debugging the watch loop: - Never block Swift's cooperative thread pool - Read pipe data before waitUntilExit to avoid deadlock - Never use try? with Task.sleep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.