theia icon indicating copy to clipboard operation
theia copied to clipboard

[plugins] reference multiple plugin directories when using the cli argument

Open sinamoeini opened this issue 5 years ago • 13 comments

Description

Is it possible to add another folder to --plugins? like a secondary folder? something like?

yarn theia start --plugins=local-dir:../../plugins:../../../another-plugins-folder

sinamoeini avatar Jan 29 '20 18:01 sinamoeini

From what I can tell from the source code only a single directory can be referenced using the cli option. If so, I think it might be a useful improvement to lookup from a list of directories instead.

Perhaps @eclipse-theia/plugin-system may have some more information.

vince-fugnitto avatar Jan 29 '20 19:01 vince-fugnitto

We could improve to allow either to pass --plugins option multiple times or comma separated values.

You also can use an env variable instead right now which supports comma separated values: https://github.com/eclipse-theia/theia/blob/049fb524480292274131c0f888e82a9fbaa7878f/packages/plugin-ext/src/main/node/plugin-deployer-impl.ts#L92-L105

akosyakov avatar Jan 30 '20 02:01 akosyakov

I didn't now that there was a global variable. Now it make sense, a global plugins dir set through THEIA_DEFAULT_PLUGINS or THEIA_PLUGINS and a local specific to project in --plugins

sinamoeini avatar Jan 30 '20 14:01 sinamoeini

@akosyakov env variables make a lot of sense in container, where you don't have more than one installation of Theia. For me locally, I typically have multiple ones (dev tool and target). What I'm trying to say is I am +1 on adding multi-folder to the cli.

tsmaeder avatar Jan 31 '20 09:01 tsmaeder

I have another suggestion can separate the folders with ":" instead ","? To be consistent with PATH variable?

sinamoeini avatar Jan 31 '20 14:01 sinamoeini

hi, I don't think it might work for : as value can contain protocol/link like local-dir:///tmp

if split is around : it will break

benoitf avatar Jan 31 '20 14:01 benoitf

Should be system path separator, not fixed ':'

tsmaeder avatar Jan 31 '20 14:01 tsmaeder

yes you are right. Forgot about local-dir

sinamoeini avatar Jan 31 '20 14:01 sinamoeini

I think it should be: yarn theia start --plugins=../../plugins --plugins../../../another-plugins-folder

without any separators

akosyakov avatar May 29 '20 12:05 akosyakov

Is there any solution for this issue?

rahulgupta-acquia avatar May 21 '24 14:05 rahulgupta-acquia

@rahulgupta-acquia I've just tested this with yarn theia start --plugins=local-dir:../../plugins,local-dir:../../extra-plugins, which seems to work as expected.

msujew avatar May 23 '24 16:05 msujew

@msujew Many Thanks for you help. I need to install builtin plugin in 'plugins/builtin' directory and installed plugins in plugins/installed directory. Could you please suggest a solution command.

rahulgupta-acquia avatar May 24 '24 12:05 rahulgupta-acquia

@rahulgupta-acquia I see. This is unrelated to the issue in here. I've recently answered a similar question. It's currently not possible to change the directory for user installed plugins. You might get away with overriding the service linked in my answer.

msujew avatar May 24 '24 13:05 msujew