Skip to content

Commit

Permalink
Integrate improved original message encoder
Browse files Browse the repository at this point in the history
+ Remove depdendency to vscode-ws-jsonrpc
Contributed on behalf of STMicroelectronics
  • Loading branch information
tortmayr committed May 6, 2022
1 parent 154c56c commit 750aecd
Show file tree
Hide file tree
Showing 15 changed files with 173 additions and 159 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@

- [core] Refactored the core messaging API. Replaced `vscode-ws-jsonrpc` with a custom RPC protocol that is better suited for handling binary data and enables message tunneling.
This impacts all main concepts of the messaging API. The API no longer exposes a `Connection` object and uses a generic `Channel` implementation instead.
* `MessagingService`: No longer offers the `listen` and `forward` method. Use `wsChannel`instead. [#11011](https://github.com/eclipse-theia/theia/pull/11011) - Contributed on behalf of STMicroelectronics.
<a name="breaking_changes_1.25.0">[Breaking Changes:](#breaking_changes_1.25.0)</a>
- `MessagingService`: No longer offers the `listen` and `forward` method. Use `wsChannel` instead.
[#11011](https://github.com/eclipse-theia/theia/pull/11011) - Contributed on behalf of STMicroelectronics.

<a name="breaking_changes_1.26.0">[Breaking Changes:](#breaking_changes_1.26.0)</a>

## v1.25.0 - 4/28/2022

[1.25.0 Milestone](https://github.com/eclipse-theia/theia/milestone/35)
Expand Down
1 change: 0 additions & 1 deletion packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export class SomeClass {
- `react-virtualized` (from [`react-virtualized@^9.20.0`](https://www.npmjs.com/package/react-virtualized))
- `vscode-languageserver-protocol` (from [`vscode-languageserver-protocol@~3.15.3`](https://www.npmjs.com/package/vscode-languageserver-protocol))
- `vscode-uri` (from [`vscode-uri@^2.1.1`](https://www.npmjs.com/package/vscode-uri))
- `vscode-ws-jsonrpc` (from [`vscode-ws-jsonrpc@^0.2.0`](https://www.npmjs.com/package/vscode-ws-jsonrpc))
- `dompurify` (from [`dompurify@^2.2.9`](https://www.npmjs.com/package/dompurify))
- `express` (from [`express@^4.16.3`](https://www.npmjs.com/package/express))
- `lodash.debounce` (from [`lodash.debounce@^4.0.8`](https://www.npmjs.com/package/lodash.debounce))
Expand Down
4 changes: 1 addition & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
"uuid": "^8.3.2",
"vscode-languageserver-protocol": "~3.15.3",
"vscode-uri": "^2.1.1",
"vscode-ws-jsonrpc": "^0.2.0",
"ws": "^7.1.2",
"yargs": "^15.3.1"
},
Expand Down Expand Up @@ -108,8 +107,7 @@
"react-dom",
"react-virtualized",
"vscode-languageserver-protocol",
"vscode-uri",
"vscode-ws-jsonrpc"
"vscode-uri"
],
"export =": [
"dompurify as DOMPurify",
Expand Down
1 change: 0 additions & 1 deletion packages/core/shared/vscode-ws-jsonrpc/index.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/shared/vscode-ws-jsonrpc/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/core/src/browser/progress-status-bar-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// *****************************************************************************

import { injectable, inject } from 'inversify';
import { CancellationToken } from 'vscode-ws-jsonrpc';
import { CancellationToken } from '../../shared/vscode-languageserver-protocol';
import { ProgressClient, ProgressMessage, ProgressUpdate } from '../common';
import { StatusBar, StatusBarAlignment } from './status-bar';
import { Deferred } from '../common/promise-util';
Expand Down
12 changes: 9 additions & 3 deletions packages/core/src/common/message-rpc/message-buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
export interface WriteBuffer {
writeUint8(byte: number): WriteBuffer
writeUint16(value: number): WriteBuffer
writeUint32(value: number): WriteBuffer;
writeString(value: string): WriteBuffer;
writeBytes(value: Uint8Array): WriteBuffer;
writeUint32(value: number): WriteBuffer
writeString(value: string): WriteBuffer
writeBytes(value: Uint8Array): WriteBuffer
writeNumber(value: number): WriteBuffer
writeLength(value: number): WriteBuffer
/**
* Makes any writes to the buffer permanent, for example by sending the writes over a channel.
Expand Down Expand Up @@ -65,6 +66,11 @@ export class ForwardingWriteBuffer implements WriteBuffer {
return this;
}

writeNumber(value: number): WriteBuffer {
this.underlying.writeNumber(value);
return this;
}

commit(): void {
this.underlying.commit();
}
Expand Down
Loading

0 comments on commit 750aecd

Please sign in to comment.