You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: remove dead gRPC plumbing after JSON-RPC migration (PR 3/3) (#1867)
Both transport halves now speak JSON-RPC over a TCP loopback socket
(#1863 PR 1/3, #1864 PR 2/3). This final cleanup removes the now-dead
gRPC references so the repo has zero gRPC plumbing and is ready to cut
a release.
- proto/gradle.proto: delete the `service Gradle { ... }` block (all
message definitions stay - they remain the JSON-RPC payload schema).
- build.gradle: delete the unused `grpcVersion` ext property.
- cgmanifest.json: drop the 4 stale io.grpc maven entries (deps removed
in PR 1/3).
- ThirdPartyNotices.txt: drop the grpc notice + renumber the index.
- npm-package: drop the unused `@grpc/grpc-js` dependency + refresh lock.
- extension/webpack.config.js: drop the dead `@grpc/proto-loader` external.
- docs (README/ARCHITECTURE/CONTRIBUTING): describe the transport as
JSON-RPC over TCP loopback instead of gRPC.
- code comments: reword stale/legacy "gRPC" mentions to "legacy
transport" while keeping the error-code-parity rationale.
No runtime behavior change; no proto schema change; log/telemetry paths
untouched.
Copy file name to clipboardExpand all lines: ARCHITECTURE.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,31 +21,31 @@ For information about the Build Server itself, visit the [Gradle Build Server](h
21
21
Language Server provides language features such as code completion and diagnostics for Gradle script files. It communicates with the Language Client using the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) through named pipe.
22
22
23
23
## Task Server
24
-
The task server and client using [gRPC](https://grpc.io/)as the interface between each other. It uses TypeScript (Node.js) on the client and Java on the server. A long running server provides very good performance.
24
+
The task server and client use [JSON-RPC 2.0](https://www.jsonrpc.org/specification) over a TCP loopback socket (`127.0.0.1` + an ephemeral port) as the interface between each other, via [LSP4J](https://github.com/eclipse-lsp4j/lsp4j) on the server and [`vscode-jsonrpc`](https://www.npmjs.com/package/vscode-jsonrpc) on the client. It uses TypeScript (Node.js) on the client and Java on the server. A long running server provides very good performance.
25
25
26
-
On extension activate, the client starts the Java gRPC server which remains running for the period the extension is activated. The server is packaged with the extension as a fat `.jar` file and is started by Node.js via executables generated by Gradle [CreateStartScripts](https://docs.gradle.org/current/dsl/org.gradle.jvm.application.tasks.CreateStartScripts.html).
26
+
On extension activate, the client binds the loopback listener and starts the Java server, which connects back over JSON-RPC and remains running for the period the extension is activated. The server is packaged with the extension as a fat `.jar` file and is started by Node.js via executables generated by Gradle [CreateStartScripts](https://docs.gradle.org/current/dsl/org.gradle.jvm.application.tasks.CreateStartScripts.html).
27
27
28
-
[Protocol buffers](https://developers.google.com/protocol-buffers) are used to define the gRPC service & messages. The Java & JavaScript message classes, as well as the client and server interfaces, are generated from the Protobuf files via the `protoc` compiler. TypeScript type definitions are generated from the JavaScript classes.
28
+
[Protocol buffers](https://developers.google.com/protocol-buffers) are used to define the message types exchanged between the client and server (serialized as payloads inside the JSON-RPC envelope). The Java & JavaScript message classes are generated from the Protobuf files via the `protoc` compiler. TypeScript type definitions are generated from the JavaScript classes.
29
29
30
30
The Java server uses the [Gradle Tooling Api](https://docs.gradle.org/current/userguide/third_party_integration.html#embedding) to discover projects & tasks, and to run Gradle tasks.
31
31
32
32
### Discovering Projects & Tasks
33
33
34
34
Tasks belong to projects and projects are hierarchical, meaning projects can have sub-projects, and any/all projects in the tree can have tasks.
35
35
36
-
The gRPC server provides a `getBuild` method to provide this hierarchical data structure, and accepts a `projectDir` argument, which the client provides.
36
+
The server provides a `getBuild` method to provide this hierarchical data structure, and accepts a `projectDir` argument, which the client provides.
37
37
38
38
A root project (`projectDir`) is defined by having a gradle wrapper script at the root (`gradlew` or `gradlew.bat`). By default the extension will search for wrapper scripts at the root of the workspaces, but you can control this behaviour by setting `gradle.nestedProjects` to allow the extension to discover Gradle projects at other locations.
39
39
40
-
Once the client has discovered the root projects for all workspaces, it requests project data for each root project via separate gRPC method calls using `getBuild`. Gradle progress and output (`STDERR` & `STDOUT`) are streamed to the client. Once the tasks have been discovered and returned to the client, it builds a single-dimensional list of vscode tasks from the Gradle project tasks. These vscode tasks have definitions that contain all the relevant task & project information.
40
+
Once the client has discovered the root projects for all workspaces, it requests project data for each root project via separate `getBuild` method calls. Gradle progress and output (`STDERR` & `STDOUT`) are streamed to the client. Once the tasks have been discovered and returned to the client, it builds a single-dimensional list of vscode tasks from the Gradle project tasks. These vscode tasks have definitions that contain all the relevant task & project information.
41
41
42
42
The extension models the project hierarchical structure using the vscode tree view. The tree view data provider consumes the vscode tasks, and builds a tree of projects & tasks using the information provided in the task definitions.
43
43
44
44
### Running Tasks
45
45
46
46
Gradle tasks can be run through either the [Tree View](https://code.visualstudio.com/api/extension-guides/tree-view) or the Command Palette.
47
47
48
-
Tasks are run via the `runBuild`gRPC method. Similar to getting project data, Gradle progress and output (`STDERR` & `STDOUT`) is streamed to the client. Tasks are run in a custom vscode terminal. The `runBuild` gRPC method accepts a list of arguments which are passed to the `BuildLauncher`.
48
+
Tasks are run via the `runBuild` method. Similar to getting project data, Gradle progress and output (`STDERR` & `STDOUT`) is streamed to the client. Tasks are run in a custom vscode terminal. The `runBuild` method accepts a list of arguments which are passed to the `BuildLauncher`.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,6 @@ Start by opening an issue using one of the issue templates, or propose a change
14
14
- Add `npm_arch=x64` to $HOME/.gradle/gradle.properties
15
15
- Add `protoc_platform=osx-x86_64` to $HOME/.gradle/gradle.properties
16
16
5. If using Windows:
17
-
- The extension uses `grpc-tools@1.12.x` dependency which does not work out-of-the-box in Windows (check [this issues](https://github.com/grpc/grpc-node/issues/2338) for details), so you'll need to install some aditional DLLs if the project build is failed.
18
17
- Download and start [Build Tools for Visual Studio 2022](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022).
19
18
- Go to the **Individual Components** tab and select the following:
20
19
-`MSVC v143 - VS 2022 C++ x64/x86 build tools (latest)` (replacing `x64/x86` with your arch)
END OF javax.annotation-api NOTICES AND INFORMATION
2163
2162
2164
-
grpc NOTICES BEGIN HERE
2165
-
=============================
2166
-
Apache License
2167
-
Version 2.0, January 2004
2168
-
http://www.apache.org/licenses/
2169
-
2170
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
2171
-
2172
-
1. Definitions.
2173
-
2174
-
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
2175
-
2176
-
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
2177
-
2178
-
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
2179
-
2180
-
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
2181
-
2182
-
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
2183
-
2184
-
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
2185
-
2186
-
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
2187
-
2188
-
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
2189
-
2190
-
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
2191
-
2192
-
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2193
-
2194
-
2. Grant of Copyright License.
2195
-
2196
-
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
2197
-
2198
-
3. Grant of Patent License.
2199
-
2200
-
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
2201
-
2202
-
4. Redistribution.
2203
-
2204
-
You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
2205
-
2206
-
You must give any other recipients of the Work or Derivative Works a copy of this License; and
2207
-
You must cause any modified files to carry prominent notices stating that You changed the files; and
2208
-
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
2209
-
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
2210
-
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
2211
-
2212
-
5. Submission of Contributions.
2213
-
2214
-
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
2215
-
2216
-
6. Trademarks.
2217
-
2218
-
This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
2219
-
2220
-
7. Disclaimer of Warranty.
2221
-
2222
-
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
2223
-
2224
-
8. Limitation of Liability.
2225
-
2226
-
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
2227
-
2228
-
9. Accepting Warranty or Additional Liability.
2229
-
2230
-
While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
0 commit comments