Skip to content

Commit b4a0af6

Browse files
akosyakovjeanp413
authored andcommitted
add dev docs
1 parent 8db630a commit b4a0af6

File tree

2 files changed

+55
-23
lines changed

2 files changed

+55
-23
lines changed

README.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,4 @@ This project really only adds the minimal bits required to run VS Code in a serv
4747
4848
## Contributing
4949

50-
### Starting from sources
51-
52-
- [Start a Gitpod workspace](https://gitpod.io/#https://github.com/gitpod-io/openvscode-server)
53-
- Dev version of the server should be already up and running. Notice that the dev version is slower to load since it is not bundled (around 2000 files).
54-
55-
### Updating VS Code
56-
57-
- Update your local VS Code, open the About dialog and remember the release commit and Node.js version.
58-
- Fetch latest upstream changes and rebase the branch based on the local VS Code's commit. Drop all commits before `code web server initial commit`.
59-
- Check that [.gitpod.Dockerfile](./.gitpod.Dockerfile) and [remote/.yarnrc](./remote/.yarnrc) has latest major Node.js version of local VS Code's Node.js version.
60-
- Recompile everything: `git clean -dfx && yarn && yarn server:init`
61-
- Run smoke tests: `yarn server:smoketest`.
62-
- Start the dev server and play:
63-
- filesystem (open some project)
64-
- extension host process: check language smartness
65-
- extension management (installing/uninstalling)
66-
- install VIM extension to test web extensions
67-
- terminals
68-
- code cli should open files and manage extensions: `alias code='export VSCODE_DEV=1 && node out/server-cli.js'`
69-
- Check server/browser logs for any warnings/errors about missing capabilities and fix them.
70-
- Build the production server with all changes: `yarn gulp server-min`.
71-
- Run it and play as with the dev server: `/workspace/server-pkg/server.sh`
72-
- Open a PR with your changes and ask for help if needed. It should be agaist `gitpod-io/openvscode-server` repo and `main` branch!
50+
[See development docs.](./doc/development.md)

doc/development.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Developing OpenVSCode Server
2+
3+
This guide implies that you have a good understanding of [source code organization](https://github.com/microsoft/vscode/wiki/Source-Code-Organization) and [development flow](https://github.com/microsoft/vscode/wiki/How-to-Contribute) of Code-OSS.
4+
5+
## Source Code Organization
6+
7+
We add [server](../src/vs/server) layer glueing everything required to run the server including the [web workbench](../src/vs/server/browser/workbench/workbench.ts), the [remote server](../src/vs/server/node/server.ts) and the [remote CLI](../src/vs/server/node/cli.ts).
8+
9+
The server consist of 2 applications:
10+
- The web workbench is an entry point to a browser application configuring various services
11+
like how to establish the connection with the backend, resolve remote resources, load webviews, and so on.
12+
- The server is running on a remote machine that serves the web workbench and static resources for webviews, extensions, and so on, as well as provides access to the file system, terminals, extensions, and so on.
13+
14+
The workbench and the server are communicating via RPC calls over web socket connections. There are 2 kinds of connections that we support right now:
15+
- the management connection provides access to the server RPC channels, like filesystem and terminals;
16+
- the extension connection creates the remote extension host process per a browser window to run extensions.
17+
18+
For each window, the server installs the CLI socket server and injects a special env var pointing to the socket file into each terminal. It allows the remote CLI to send commands to a proper window, for instance, to open a file.
19+
20+
Note that the workbench can be also bundled independently to serve from some CDN services. The server can run in headless mode if sources of the web workbench are missing.
21+
## Building
22+
23+
### Starting from sources
24+
25+
- [Start a Gitpod workspace](https://gitpod.io/#https://github.com/gitpod-io/openvscode-server)
26+
- Dev version of the server should be already up and running. Notice that the dev version is slower to load since it is not bundled (around 2000 files).
27+
28+
### Bundling
29+
30+
Run `yarn gulp server-min` to create production-ready distributable from sources. After the build is finished, you will be able to find following folders next to the project directory:
31+
- `server-pkg-web` contains the web workbench static resources,
32+
- `server-pkg-server` contains the headless remote server with the remote CLI,
33+
- `serfver-pkg` contains everything together to be distributed standalone.
34+
35+
You can find gulp bundling tasks [here](../build/gulpfile.server.js).
36+
37+
### Updating VS Code
38+
39+
- Update your local VS Code, open the About dialog and remember the release commit and Node.js version.
40+
- Fetch latest upstream changes and rebase the branch based on the local VS Code's commit. Drop all commits before `code web server initial commit`.
41+
- Check that [.gitpod.Dockerfile](./.gitpod.Dockerfile) and [remote/.yarnrc](./remote/.yarnrc) has latest major Node.js version of local VS Code's Node.js version.
42+
- Recompile everything: `git clean -dfx && yarn && yarn server:init`
43+
- Run smoke tests: `yarn server:smoketest`.
44+
- Start the dev server and play:
45+
- filesystem (open some project)
46+
- extension host process: check language smartness
47+
- extension management (installing/uninstalling)
48+
- install VIM extension to test web extensions
49+
- terminals
50+
- code cli should open files and manage extensions: `alias code='export VSCODE_DEV=1 && node out/server-cli.js'`
51+
- Check server/browser logs for any warnings/errors about missing capabilities and fix them.
52+
- Build the production server with all changes: `yarn gulp server-min`.
53+
- Run it and play as with the dev server: `/workspace/server-pkg/server.sh`
54+
- Open a PR with your changes and ask for help if needed. It should be agaist `gitpod-io/openvscode-server` repo and `main` branch!

0 commit comments

Comments
 (0)