First one question/clarification.
some of our extensions’ backends call Python scripts which have their own dependencies
Here, do you mean Theia extensions or vscode extensions (aka Theia Plugins)? I will assume you mean
vscode extensions for the rest of the comment.
Firstly, for the
separation of concerns principle, the idea is that when an extension is triggered by the user, a process is initiated in order to install the required dependencies right?
Correct - usually an action from the user will be the trigger. E.g. an extension can ask to be activated when one or more file of a certain type is opened in the IDE.
Is there any function that handles/checks the triggering of an extension?
Assuming we’re talking about vscode extensions, here is vscode documentation about activation events. You can mention which events are relevant for you extension in your
When an event that matches an extension’s activation events happens, the extension is activated, and its
activate() function is called. e.g. for
Secondly, the “entry point modification” tactic would be to alter the main entry point such that if its the first time, it runs a script which installs necessary packages, and then after that just goes to src-gen/frontend/electron-main.js? Would this carry forward when the application is packaged as well?
Yes and yes. For example, we do similar in the theia-electron example app, and this sticks in the generated packages.