8000 feat(core): add collision detection and update methods by pyyupsk · Pull Request #103 · vitejs/devtools · GitHub
[go: up one dir, main page]

Skip to content

Conversation

pyyupsk
Copy link
@pyyupsk pyyupsk commented Oct 2, 2025
  • Add collision detection to RpcFunctionsHost and DevToolsDockHost
  • Add update() methods with existence validation
  • Implement RPC error handling with Debug logger

Note: Client-side broadcast for reactive updates not included

handler = result.handler
}

return ((...args: ARGS) => {
Copy link
Member

Choose a reason for hiding this comment

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

We could do the handling on birpc side instead of wrapping the function.

const result = handler(...args)
if (result instanceof Promise) {
return result.catch((error) => {
debug(`RPC call "${definition.name}" failed:`, error)
Copy link
Member

Choose a reason for hiding this comment

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

Error should not go to debug (which is default to silent). We could have a logger interface where for now could be a simple abstraction of console.log and console.error

Copy link
Author
@pyyupsk pyyupsk left a comment

Choose a reason for hiding this comment

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

Updated! Removed the wrapper and now birpc's onError (ws.ts:40) handles all RPC errors with console.error.

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

0