Skip to content

Run all extensions in a single JS context (1 Web Worker)

Warren Gifford requested to merge ext-cleanup into master

Created by: sqs

  • Use a single Web Worker for all extensions (instead of 1 Web Worker per extension). Reasons: it is faster to start (does not incur JS parsing and init for extension host for each extension), it avoids browser limits on max running Web Workers (~20 for Firefox), it reduces the message passing by a lot, and (for the future) it lets us support extensions exposing APIs to other extensions (like how VS Code's Azure extension exposes an API that lets other extensions perform Azure actions with the user's auth and context).
  • Make the distinction between the controller/client/PlatformContext clearer
  • Other cleanups and refactors

Incidentally fixes https://github.com/sourcegraph/sourcegraph/issues/748

TODOs (before merge):

  • Add back context clientApplication.isSourcegraph (used by git-extras extension)
  • Document need to support deactivation

TODOs (post-merge):

  • Move shared/src/schema/extension.schema.ts - rename it to "extension manifest"
  • Remove args from the extension manifest schema
  • Rename remaining configuration things to settings

Merge request reports

Loading