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

fix: rpc protocol devtools capturer #3558

Merged
merged 14 commits into from
Apr 23, 2024
Merged

fix: rpc protocol devtools capturer #3558

merged 14 commits into from
Apr 23, 2024

Conversation

bytemain
Copy link
Member

@bytemain bytemain commented Apr 17, 2024

Types

  • 🐛 Bug Fixes

Background or solution

修复插件进程的通信无法被 chrome extension devtools 捕获

移除所有对 vscode-jsonrpc 的导出

Changelog

@opensumi opensumi bot added the 🐞 bug Something isn't working label Apr 17, 2024
Copy link

railway-app bot commented Apr 17, 2024

This PR is being deployed to Railway 🚅

core: ◻️ REMOVED

Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 67.05882% with 56 lines in your changes are missing coverage. Please review.

Project coverage is 56.02%. Comparing base (d59bb5f) to head (b06d09d).
Report is 5 commits behind head on main.

Files Patch % Lines
packages/connection/src/common/capturer.ts 62.31% 19 Missing and 7 partials ⚠️
packages/utils/src/decorators.ts 8.33% 17 Missing and 5 partials ⚠️
...nsion/src/browser/vscode/api/main.thread.editor.ts 86.95% 3 Missing ⚠️
...es/connection/src/common/rpc-service/proxy/json.ts 83.33% 2 Missing ⚠️
...nsion-manager/src/browser/vsx-extension.service.ts 0.00% 1 Missing ⚠️
packages/extension/src/common/vscode/converter.ts 0.00% 1 Missing ⚠️
packages/utils/src/event.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3558      +/-   ##
==========================================
- Coverage   56.10%   56.02%   -0.09%     
==========================================
  Files        1489     1490       +1     
  Lines       91026    91257     +231     
  Branches    18661    18722      +61     
==========================================
+ Hits        51068    51123      +55     
- Misses      33148    33277     +129     
- Partials     6810     6857      +47     
Flag Coverage Δ
jsdom 51.40% <54.11%> (-0.08%) ⬇️
node 15.65% <51.76%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

hacke2
hacke2 previously approved these changes Apr 22, 2024
Copy link
Member

@hacke2 hacke2 left a comment

Choose a reason for hiding this comment

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

+1

@bytemain
Copy link
Member Author

  1. packages/connection/src/common/message.ts 这个路径不再会默认导出,我们在这个文件里会 import 一遍 vscode-jsonrpc/node/ril,所以这是个 breaking change,你要手动 import 一下这个路径以使 jsonrpc 工作,或者你可以接入 sumirpc
  2. WSChannel.createMessageConnection 方法被移除,你需要使用以下代码替代:
import { createWebSocketConnection } from '@opensumi/ide-connection/lib/common/message';

const xxxx = createWebSocketConnection({
    onMessage: (cb: any) => {
      port.on('message', cb);
    },
    send: (data: any) => {
      port.postMessage(data);
    },
  });

@bytemain bytemain merged commit 5d54570 into main Apr 23, 2024
12 checks passed
@bytemain bytemain deleted the fix/connection-capturer branch April 23, 2024 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants