Skip to content

Improve engineering overhead of extensions #115023

Closed as not planned
Closed as not planned
@joaomoreno

Description

@joaomoreno

Considering we want to keep the core extensions within the VS Code repo for the time being, let's look into improving the engineering overhead of that situation. We want to avoid recompiling extensions unnecessarily, something which happens often in the CI as well as in each dev box.

Here's what I'm thinking:

  1. Each extension should have a few npm scripts: package (which creates a VSIX), watch (which compiles the sources in watch mode).
  2. At any CI run, it should be possible to figure out what was the last commit which affected any given extension (something like git log -1 -- extension/NAME, or similar). We can use that commit ID as a cache key to save the extension's built VSIX in a storage account.
  3. During CI, the build machine should check whether each extension's cache is fresh or stale. If stale, the extension should be packaged with yarn && yarn package and the resulting VSIX should be cached in the storage account. If fresh, the same Marketplace VSIX mechanism should be used to fetch the VSIX from a remote location, but this time from the storage account.
  4. Additionally, we can improve the local yarn watch experience to fetch the VSIXs from the same storage account, which should have public read access. Given that a dev has no changes which affect an extension, the VSIX should just be used. As soon as changes appear locally, yarn watch should do the right thing automatically (yarn && yarn watch on the extension folder, and signal code-oss to use it instead).

This way we can reduce build times, dev times and keep having extensions in the microsoft/vscode repo.

Metadata

Metadata

Labels

engineeringVS Code - Build / issue tracking / etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions