-
-
Notifications
You must be signed in to change notification settings - Fork 12
feat(vscode): communicate with worker using ipc instead of websocket #691
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
Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
aabb3db to
7e3f7af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modernizes the VSCode extension's worker communication by replacing WebSocket-based IPC with Node.js native IPC, reducing dependencies and improving architecture. The changes introduce an RPC-style API and a reusable logger infrastructure for both master and worker processes.
- Removed WebSocket dependencies (
ws,get-port,@types/ws) in favor of native Node.js IPC - Implemented a custom RPC framework using IPC message passing with typed method proxies
- Refactored logger architecture with a shared
BaseLoggerclass for both master and worker processes
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Removed WebSocket-related dependencies (ws, get-port, @types/ws) |
| packages/vscode/package.json | Updated devDependencies to remove WebSocket packages |
| packages/vscode/src/shared/rpc.ts | New RPC implementation using IPC for bidirectional communication |
| packages/vscode/src/shared/logger.ts | New shared base logger class with formatted output |
| packages/vscode/src/master.ts | Refactored to use IPC-based RPC instead of WebSocket connections |
| packages/vscode/src/worker/index.ts | Simplified worker to expose methods via RPC and use Promise.withResolvers |
| packages/vscode/src/worker/logger.ts | Worker logger now proxies log calls to master via RPC |
| packages/vscode/src/logger.ts | Master logger extends BaseLogger and outputs to VSCode channel |
| packages/vscode/src/types.ts | Removed WebSocket-specific type fields (type discriminators and id) |
| packages/vscode/src/utils.ts | Added promiseWithTimeout utility function |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
thank you for your contribution. 😇 |
|
there's a conflict, after resolving, we're good to merge. |
5066ad1 to
3e0b66e
Compare
|
done |
|
thank you for the work again. |
Summary
Related Links
Checklist