Skip to content
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

Jmdots/v0.2.1 #17

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Jmdots/v0.2.1 #17

wants to merge 3 commits into from

Conversation

jmdots
Copy link
Contributor

@jmdots jmdots commented Dec 18, 2024

No description provided.

The make server was experiencing unhandled TaskGroup errors when subprocess
operations failed. This update improves error handling by:

- Replace proc.communicate() with explicit TaskGroup-based stream reading
- Add proper exception handling for TaskGroup errors including ExceptionGroup
- Improve subprocess cleanup on errors and cancellation
- Add explicit error logging to stderr for server process errors

This change fixes the "unhandled errors in TaskGroup" issue that was causing
Claude Desktop to hang when subprocess operations failed.

Note: A follow-up PR should add more comprehensive tests for subprocess error
scenarios and TaskGroup error handling.
The make server had issues with unhandled subprocess errors and type safety.
This update improves error handling and type checking by:

- Replace TaskGroup with explicit asyncio.gather() and task management
- Add proper type hints and casting for StreamReader objects
- Improve subprocess cleanup on errors and cancellation
- Add better error context propagation
- Fix mypy type checking issues

The changes ensure proper handling of subprocess failures and maintain
type safety throughout the codebase. All linting and type checks now pass.

Note: Consider adding more test cases for subprocess error scenarios in
a future update.
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