diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 3cbe7a34d0717..c417f1e5b1962 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -1,11 +1,5 @@ FROM gitpod/workspace-full:latest -USER root - -# leeway -ENV LEEWAY_NESTED_WORKSPACE=true -RUN cd /usr/bin && curl -fsSL https://github.com/gitpod-io/leeway/releases/download/v0.2.5/leeway_0.2.5_Linux_x86_64.tar.gz | tar xz - USER gitpod # We use latest major version of Node.js distributed VS Code. (see about dialog in your local VS Code) @@ -25,33 +19,3 @@ RUN sudo apt-get update \ libasound2 libgbm1 xfonts-base xfonts-terminus fonts-noto fonts-wqy-microhei \ fonts-droid-fallback vim-tiny nano libgconf2-dev libgtk-3-dev twm \ && sudo apt-get clean && sudo rm -rf /var/cache/apt/* && sudo rm -rf /var/lib/apt/lists/* && sudo rm -rf /tmp/* - -## Register leeway autocompletion in bashrc -RUN bash -c "echo . \<\(leeway bash-completion\) >> ~/.bashrc" - -### Google Cloud ### -# not installed via repository as then 'docker-credential-gcr' is not available -ARG GCS_DIR=/opt/google-cloud-sdk -ENV PATH=$GCS_DIR/bin:$PATH -RUN sudo chown gitpod: /opt \ - && mkdir $GCS_DIR \ - && curl -fsSL https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-344.0.0-linux-x86_64.tar.gz \ - | tar -xzvC /opt \ - && /opt/google-cloud-sdk/install.sh --quiet --usage-reporting=false --bash-completion=true \ - --additional-components docker-credential-gcr alpha beta \ - # needed for access to our private registries - && docker-credential-gcr configure-docker - -# Install tools for gsutil -RUN sudo install-packages \ - gcc \ - python-dev \ - python-setuptools - -RUN bash -c "pip uninstall crcmod; pip install --no-cache-dir -U crcmod" - -# Set Application Default Credentials (ADC) based on user-provided env var -RUN echo ". /workspace/vscode/scripts/setup-google-adc.sh" >> ~/.bashrc - -ENV LEEWAY_WORKSPACE_ROOT=/workspace/vscode -ENV LEEWAY_REMOTE_CACHE_BUCKET=gitpod-core-leeway-cache-branch diff --git a/.gitpod.yml b/.gitpod.yml index 917dfcc8702c8..eb0d4be8952f0 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -5,9 +5,8 @@ ports: onOpen: open-browser tasks: - init: | - export VSCODE_INIT_BUILD_DIR=$(leeway describe "//:init" -t "/tmp/build/{{ .Metadata.Name }}.{{ .Metadata.Version }}") - leeway build - sudo cp -rup "$VSCODE_INIT_BUILD_DIR/install/." . | true + yarn + yarn gitpod:init command: | gp sync-done init export NODE_ENV=development diff --git a/BUILD.yaml b/BUILD.yaml deleted file mode 100644 index e1e418e348c0a..0000000000000 --- a/BUILD.yaml +++ /dev/null @@ -1,17 +0,0 @@ -packages: - - name: install - type: generic - srcs: - - "**" - config: - commands: - - ["yarn"] - - name: init - type: generic - deps: - - ":install" - config: - commands: - - ["yarn", "--cwd", "./install/build", "compile"] - - ["yarn", "--cwd", "./install", "compile"] - - ["yarn", "--cwd", "./install", "download-builtin-extensions"] diff --git a/README.md b/README.md index 2c15dfddb720c..e173c146c7439 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,24 @@ At Gitpod we've been asked a lot about how we do it. So we thought we might just ## Getting started -The easiest way to get started is ... +### Docker + +- Start the server: +```bash +docker run -it --init -p 3000:3000 -v "$(pwd):/home/workspace:cached" gitpod/vscode +``` +- after this, visit [localhost:3000](http://localhost:3000). + +### Linux + +- [Download the latest release](https://github.com/gitpod-io/vscode-releases/releases/latest) +- untar and run the server: +```bash +tar -xzf code-web-server-v*.tar.gz +cd code-web-server-v* +./server.sh +``` +- after this, visit [localhost:3000](http://localhost:3000). ## The scope of this project @@ -27,3 +44,29 @@ This project really only adds the minimal bits required to run VS Code in a web > **For any feature requests, bug reports, or contributions that are not specific to running VS Code in a web server context,** > > **please go to [Visual Studio Code - Open Source "OSS"](https://github.com/microsoft/vscode)** + +## Contributing + +### Starting from sources + +- [Start a Gitpod workspace](https://gitpod.io/#https://github.com/gitpod-io/vscode/tree/web-server) +- 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). + +### Updating VS Code + +- Update your local VS Code, open the About dialog and remember the release commit and Node.js version. +- 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`. +- 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. +- Recompile everything: `git clean -dfx && yarn && yarn gitpod:init` +- Run smoke tests: `yarn gitpod:smoketest`. +- Start the dev server and play: + - filesystem (open some project) + - extension host process: check language smartness + - extension management (installing/uninstalling) + - install VIM extension to test web extensions + - terminals + - code cli should open files and manage extensions: `alias code='export VSCODE_DEV=1 && node out/server-cli.js'` +- Check server/browser logs for any warnings/errors about missing capabilities and fix them. +- Build the production server with all changes: `yarn gulp server-min`. +- Run it and play as with the dev server: `/workspace/server-pkg/server.sh` +- Open a PR with your changes and ask for help if needed. It should be agaist `gitpod-io/vscode` repo and `web-server` branch! diff --git a/WORKSPACE.yaml b/WORKSPACE.yaml deleted file mode 100644 index 3054d1bcff669..0000000000000 --- a/WORKSPACE.yaml +++ /dev/null @@ -1 +0,0 @@ -defaultTarget: "//:init" diff --git a/package.json b/package.json index 2ed7b5277aa64..6142a96fedc99 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,9 @@ "minify-vscode-reh-web": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js minify-vscode-reh-web", "hygiene": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js hygiene", "core-ci": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js core-ci", - "extensions-ci": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js extensions-ci" + "extensions-ci": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js extensions-ci", + "gitpod:init": "yarn --cwd ./build compile && yarn compile && yarn download-builtin-extensions", + "gitpod:smoketest": "yarn --cwd ./test/smoke compile && yarn smoketest-no-compile --web --verbose --headless --electronArgs=\"--disable-dev-shm-usage --use-gl=swiftshader\"" }, "dependencies": { "@vscode/vscode-languagedetection": "1.0.15", diff --git a/product.json b/product.json index 93414d45bf251..70094d17c555b 100644 --- a/product.json +++ b/product.json @@ -27,6 +27,7 @@ "GitHub.vscode-pull-request-github", "GitHub.vscode-pull-request-github-insiders", "ms-python.python", + "ms-toolsai.jupyter", "ms-vscode.js-debug-nightly", "ms-vscode.js-debug", "ms-vscode.lsif-browser", diff --git a/test/smoke/src/areas/extensions/extensions.test.ts b/test/smoke/src/areas/extensions/extensions.test.ts index 81598e106179d..fd6c5ea948bfa 100644 --- a/test/smoke/src/areas/extensions/extensions.test.ts +++ b/test/smoke/src/areas/extensions/extensions.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import minimist = require('minimist'); -import { Application, Quality } from '../../../../automation'; +import { Application } from '../../../../automation'; import { afterSuite, beforeSuite } from '../../utils'; export function setup(opts: minimist.ParsedArgs) {