-
Notifications
You must be signed in to change notification settings - Fork 6k
docs: update sections around VS Code fork #4571
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,32 +84,31 @@ Here are these steps you should follow to get your dev environment setup: | |
|
||
1. `git clone https://github.com/cdr/code-server.git` - Clone `code-server` | ||
2. `git clone https://github.com/cdr/vscode.git` - Clone `vscode` | ||
3. `cd vscode && git checkout code-server-v2` - checkout the branch we use (not the default) | ||
4. `cd vscode && yarn install` - install the dependencies in the `vscode` repo | ||
5. `cd code-server && yarn install` - install the dependencies in the `code-server` repo | ||
6. `cd vscode && yarn link` - use `yarn` to create a symlink to the `vscode` repo (`code-oss-dev` package) | ||
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 | ||
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. | ||
3. `cd vscode && yarn install` - install the dependencies in the `vscode` repo | ||
4. `cd code-server && yarn install` - install the dependencies in the `code-server` repo | ||
5. `cd vscode && yarn link` - use `yarn` to create a symlink to the `vscode` repo (`code-oss-dev` package) | ||
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 | ||
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. | ||
|
||
### Updates to VS Code | ||
|
||
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: | ||
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: | ||
|
||
1. Update the package tag listed in `vendor/package.json`: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was not introduced in your PR but it looks like the following steps begin at 1 again: It seems the auto-numbering cannot take into account breaks like the code block here. Another reason to avoid them I suppose 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh dang it! lol i'll see if I can fix that |
||
|
||
```json | ||
{ | ||
"devDependencies": { | ||
"vscode": "cdr/vscode#X.XX.X-code-server" | ||
"vscode": "cdr/vscode#<latest-commit-sha>" | ||
} | ||
} | ||
``` | ||
|
||
1. From the code-server **project root**, run `yarn install`. | ||
2. From the code-server **project root**, run `yarn install`. | ||
Then, test code-server locally to make sure everything works. | ||
1. Check the Node.js version that's used by Electron (which is shipped with VS | ||
3. Check the Node.js version that's used by Electron (which is shipped with VS | ||
Code. If necessary, update your version of Node.js to match. | ||
1. Open a PR | ||
4. Open a PR | ||
|
||
> Watch for updates to | ||
> `vendor/modules/code-oss-dev/src/vs/code/browser/workbench/workbench.html`. You may need to | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
- [Docker](#docker) | ||
- [Homebrew](#homebrew) | ||
- [npm](#npm) | ||
- [Syncing with Upstream VS Code](#syncing-with-upstream-vs-code) | ||
- [Testing](#testing) | ||
- [Documentation](#documentation) | ||
- [Troubleshooting](#troubleshooting) | ||
|
@@ -126,8 +127,7 @@ the issue. | |
|
||
### Merge strategies | ||
|
||
For most things, we recommend the **squash and merge** strategy. If you're | ||
updating `lib/vscode`, we suggest using the **rebase and merge** strategy. There | ||
For most things, we recommend the **squash and merge** strategy. There | ||
may be times where **creating a merge commit** makes sense as well. Use your | ||
best judgment. If you're unsure, you can always discuss in the PR with the team. | ||
|
||
|
@@ -215,6 +215,18 @@ We publish code-server as a npm package [here](https://www.npmjs.com/package/cod | |
|
||
This is currently automated with the release process. | ||
|
||
## Syncing with Upstream VS Code | ||
|
||
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: | ||
|
||
1. `git checkout -b vscode-update` - Create a new branch locally based off `main` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ Is this the best approach? Originally @TeffenEllis suggested going to the GitHub UI and hitting "fetch upstream." From a dev's perspective, that makes it super easy! The downside to that approach is there may be merge conflicts to resolve locally. If there are, they can't be reviewed by another developer. Thoughts @code-asher? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this approach. We will likely keep having conflicts for a while (we already currently have conflicts with upstream). |
||
2. `git fetch upstream` - Fetch upstream (VS Code)'s latest `main` branch | ||
3. `git merge upstream/main` - Merge it locally | ||
1. If there are merge conflicts, fix them locally | ||
4. Open a PR merging your branch (`vscode-update`) into `main` and add the code-server review team | ||
|
||
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). | ||
|
||
## Testing | ||
|
||
Our testing structure is laid out under our [Contributing docs](https://coder.com/docs/code-server/latest/CONTRIBUTING#test). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 We're now using the
main
branch (instead ofcode-server-v2
so step 3 was removed.