Skip to content

Commit d15731a

Browse files
jsjoeiorepo-ranger[bot]
andauthoredDec 6, 2021
docs: update sections around VS Code fork (#4571)
* docs(CONTRIBUTING): update workflow based on vscode changes * docs(MAINTAINING): add section for syncing VS Code upstream Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
1 parent 80f30fc commit d15731a

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed
 

‎docs/CONTRIBUTING.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -84,32 +84,31 @@ Here are these steps you should follow to get your dev environment setup:
8484

8585
1. `git clone https://github.com/cdr/code-server.git` - Clone `code-server`
8686
2. `git clone https://github.com/cdr/vscode.git` - Clone `vscode`
87-
3. `cd vscode && git checkout code-server-v2` - checkout the branch we use (not the default)
88-
4. `cd vscode && yarn install` - install the dependencies in the `vscode` repo
89-
5. `cd code-server && yarn install` - install the dependencies in the `code-server` repo
90-
6. `cd vscode && yarn link` - use `yarn` to create a symlink to the `vscode` repo (`code-oss-dev` package)
91-
7. `cd code-server && yarn link code-oss-dev --modules-folder vendor/modules` - links your local `vscode` repo (`code-oss-dev` package) inside your local version of code-server
92-
8. `cd code-server && yarn watch` - this will spin up code-server on localhost:8080 which you can start developing. It will live reload changes to the source.
87+
3. `cd vscode && yarn install` - install the dependencies in the `vscode` repo
88+
4. `cd code-server && yarn install` - install the dependencies in the `code-server` repo
89+
5. `cd vscode && yarn link` - use `yarn` to create a symlink to the `vscode` repo (`code-oss-dev` package)
90+
6. `cd code-server && yarn link code-oss-dev --modules-folder vendor/modules` - links your local `vscode` repo (`code-oss-dev` package) inside your local version of code-server
91+
7. `cd code-server && yarn watch` - this will spin up code-server on localhost:8080 which you can start developing. It will live reload changes to the source.
9392

9493
### Updates to VS Code
9594

96-
If changes are made and merged into `code-server-v2` in the `cdr/vscode` repo, then you'll need to update the version in the `code-server` repo by following these steps:
95+
If changes are made and merged into `main` in the [`cdr/vscode`](https://github.com/cdr/vscode) repo, then you'll need to update the version in the `code-server` repo by following these steps:
9796

9897
1. Update the package tag listed in `vendor/package.json`:
9998

10099
```json
101100
{
102101
"devDependencies": {
103-
"vscode": "cdr/vscode#X.XX.X-code-server"
102+
"vscode": "cdr/vscode#<latest-commit-sha>"
104103
}
105104
}
106105
```
107106

108-
1. From the code-server **project root**, run `yarn install`.
107+
2. From the code-server **project root**, run `yarn install`.
109108
Then, test code-server locally to make sure everything works.
110-
1. Check the Node.js version that's used by Electron (which is shipped with VS
109+
3. Check the Node.js version that's used by Electron (which is shipped with VS
111110
Code. If necessary, update your version of Node.js to match.
112-
1. Open a PR
111+
4. Open a PR
113112

114113
> Watch for updates to
115114
> `vendor/modules/code-oss-dev/src/vs/code/browser/workbench/workbench.html`. You may need to

‎docs/MAINTAINING.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- [Docker](#docker)
2020
- [Homebrew](#homebrew)
2121
- [npm](#npm)
22+
- [Syncing with Upstream VS Code](#syncing-with-upstream-vs-code)
2223
- [Testing](#testing)
2324
- [Documentation](#documentation)
2425
- [Troubleshooting](#troubleshooting)
@@ -126,8 +127,7 @@ the issue.
126127

127128
### Merge strategies
128129

129-
For most things, we recommend the **squash and merge** strategy. If you're
130-
updating `lib/vscode`, we suggest using the **rebase and merge** strategy. There
130+
For most things, we recommend the **squash and merge** strategy. There
131131
may be times where **creating a merge commit** makes sense as well. Use your
132132
best judgment. If you're unsure, you can always discuss in the PR with the team.
133133

@@ -215,6 +215,18 @@ We publish code-server as a npm package [here](https://www.npmjs.com/package/cod
215215

216216
This is currently automated with the release process.
217217

218+
## Syncing with Upstream VS Code
219+
220+
The VS Code portion of code-server lives under [`cdr/vscode`](https://github.com/cdr/vscode). To update VS Code for code-server, follow these steps:
221+
222+
1. `git checkout -b vscode-update` - Create a new branch locally based off `main`
223+
2. `git fetch upstream` - Fetch upstream (VS Code)'s latest `main` branch
224+
3. `git merge upstream/main` - Merge it locally
225+
1. If there are merge conflicts, fix them locally
226+
4. Open a PR merging your branch (`vscode-update`) into `main` and add the code-server review team
227+
228+
Ideally, our fork stays as close to upstream as possible. See the differences between our fork and upstream [here](https://github.com/microsoft/vscode/compare/main...cdr:main).
229+
218230
## Testing
219231

220232
Our testing structure is laid out under our [Contributing docs](https://coder.com/docs/code-server/latest/CONTRIBUTING#test).

0 commit comments

Comments
 (0)
Please sign in to comment.