Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to solve shared files/dependencies across different plugins? #21

Closed
maraf opened this issue May 26, 2018 · 12 comments
Closed

How to solve shared files/dependencies across different plugins? #21

maraf opened this issue May 26, 2018 · 12 comments

Comments

@maraf
Copy link
Owner

maraf commented May 26, 2018

No description provided.

@maraf
Copy link
Owner Author

maraf commented May 26, 2018

Option 1: When installing plugin, take a list of all extracted files. When uninstalling, remove only those not used by any other plugin.

Cons: Requires additional file, not NuGet standard.

@RussKie
Copy link

RussKie commented May 27, 2018

I think this is a complex problem.
Right now all plugins are compiled together against the same set of dependencies - e.g. they all shared the same version of Json.NET etc.
If plugins are now built at their own cadence, their dependencies will differ from one plugin to another. This means we can't install all plugins under Plugins folder.

I think we may need to adjust where plugins live, e.g. the standard plugins (i.e. those shipped with the official release) will live under Plugins\official (the name can change) and other plugins will live under own named folders (e.g. Plugins\AppVeyorIntegration).
We will also need to load each plugin into own AppDomain so we can load all assemblies from each plugin.

/cc: @sharwell @KindDragon @jbialobr @gerhardol @drewnoakes thoughts?

@drewnoakes
Copy link

Restricting the discussion to assembly/package references for a moment, can we reasonably detect and report such conflicts when scanning for plugins?

Does MEF have anything to say about this?

@maraf
Copy link
Owner Author

maraf commented May 27, 2018

@RussKie +1 for plugin-per-folder structure. It can solve this issue for PluginManager.

@drewnoakes Unsigned VSIX suffer from this too, as two plugins can't use two different versions of the same assembly. For detecting possible problems, PluginManager can detect if such dependency in other version is already installed, so user can be notified.

@gerhardol
Copy link

How big is the need for handling plugins outside of GE core?
Should we spend time on this?

"Private" plugins can be handled by private builds.

@RussKie
Copy link

RussKie commented May 27, 2018 via email

@sharwell
Copy link

Official support for plugins via MEF is non-trivial for development and distribution strategies. I would not recommend pursuing it at this stage unless it became a primary adoption requirement, and even then it would require some long discussions about the impact to overall development.

@RussKie
Copy link

RussKie commented May 28, 2018 via email

@sharwell
Copy link

@RussKie We would need to strictly control the public API (by making everything internal until it passes API review), and then once something is made public we can't change it's behavior even if we change our mind in the future about how things should work. Then we need to rigorously apply a versioning policy for assembly names and use binding redirection to ensure future source and binary compatibility.

The best strategy is to not support the area at all. It's difficult and time consuming to get right, and anything else will fall on the floor a year or so after you start (if you aren't strict about versioning, it still takes a bit of time to realize how serious the impacts are because most approaches work at least for a short while).

@gerhardol
Copy link

Private builds built separately will introduce assembly version clashes.

What I meant is that if someone adds "PluginX", they can include the plugin in their private build of GE including the plugin until it is included in GE. I rather see that the limited GE resources are spent on features that improves GE.

A monolith is in most cases simpler to move forward than a flexible structure.

@RussKie
Copy link

RussKie commented May 29, 2018 via email

@maraf
Copy link
Owner Author

maraf commented Mar 28, 2019

I'm going to close this as there is no related work right now.
The solution has also been discussed here gitextensions/gitextensions#5776.

@maraf maraf closed this as completed Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants