Plugins activation order

While checking the plugins activation mechanism i noticed 2 things:

  1. Plugins in THEIA_DEFAULT_PLUGINS are loaded before THEIA_PLUGINS

  2. The order of the folders in the environment variable is important. (e.g. THEIA_PLUGINS=A,B plugins in A will be loaded before B)

Can i count on this?

[original thread by DoroNahari]

plugins are loaded and activated later on the frontend regardless to the order of how they are deployed on the backend

activation and loading on the frontned should happen in the topological order

there is an issue with that right now

but there is a PR to fix it, hopefully going to be merged this week:

cc @florentbenoit please correct me if i’m wrong


what if there’s no dependencies between the loaded plugins? is there any order that i can count on? will THEIA_DEFAULT_PLUGINS be loaded before THEIA_PLUGINS?

As I said THEIA_DEFAULT_PLUGINS and THEIA_PLUGINS does not affect loading/activation order at all, they are only for deployment. Frontend decides in which order deployed plugins should be loaded and activated and it relies on activation events and extension dependencies.


the topological order of vscode extensions activations should be by the extensionDependencies property?

@amiramw yes

Unfortuantely I could not find it documented anywhere in vscode docs.

hm, i have not implemented this bit: If B is not installed or if B fails to activate, then A will not be activated. in the PR

@florentbenoit Should we be siilarly stricti, for now it logs a warning but activate dependent plugin nevertheless: