Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Transitive plugin version dependencies
Transitive plugin version dependencies [message #330146] Wed, 16 July 2008 22:49 Go to next message
Hans Schwaebli is currently offline Hans SchwaebliFriend
Messages: 70
Registered: July 2009
Member
We need to have plugins of two different version numbers in the same
Eclipse directory. The question is how transitive dependencies are handled
by Eclipse (or OSGI).

Example:
Plugin A1.0 uses 3rd party plugin B1.0. Plugin B1.0 uses Plugin C1.0.

In the dependencies it is specified that A1.0 needs B1.0 (exact versin
number). But B1.0 is third party, ant it depends on C1.0-C2.0 (version
range). This cannot be changed since B and C are third party plugins.

In the plugins folder there are these plugins A1.0, B1.0, B2.0, C1.0 and
C2.0.

Of course A1.0 will use B1.0, because it is specified so in the
dependencies. But will B1.0 use C1.0 or C2.0? In its dependencies there is
a range from 1.0 to 2.0. Which one will it use when both are available?

C2.0 must not be used. Maybe its not used anyway. I am asking you this.
But if it is used, could it be possible to restrict it to 1.0? Remember
that B and C are 3rd party plugins and that both plugin versions need to
be in the plugins folder because another plugin needs them.

A bit complicated, I know.
Re: Transitive plugin version dependencies [message #330152 is a reply to message #330146] Thu, 17 July 2008 11:38 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33192
Registered: July 2009
Senior Member
Hans,

I'll answer how I think it works. Someone ought to contradict me if I'm
wrong...

Hans Schwaebli wrote:
> We need to have plugins of two different version numbers in the same
> Eclipse directory. The question is how transitive dependencies are
> handled by Eclipse (or OSGI).
>
> Example:
> Plugin A1.0 uses 3rd party plugin B1.0. Plugin B1.0 uses Plugin C1.0.
>
> In the dependencies it is specified that A1.0 needs B1.0 (exact versin
> number). But B1.0 is third party, ant it depends on C1.0-C2.0 (version
> range). This cannot be changed since B and C are third party plugins.
>
> In the plugins folder there are these plugins A1.0, B1.0, B2.0, C1.0
> and C2.0.
Some issues to consider. Many plugins are singletons and that mean two
versions of them cannot both be instantiated. I believe OSGi will always
want to prefer activating the one with the highest version number. But
of course it will also want to resolve version dependencies such that it
can activate the most plugins. I've heard that this general problem is
perhaps an NP-hard or even NP-complete problem to solve optimally.
>
> Of course A1.0 will use B1.0, because it is specified so in the
> dependencies. But will B1.0 use C1.0 or C2.0? In its dependencies
> there is a range from 1.0 to 2.0. Which one will it use when both are
> available?
I think it will tend to prefer the higher numbered version unless other
constraints force a different choice. You could make A 1.0 itself
specify a version for C that might be more restrictive than B's range,
right?
>
> C2.0 must not be used. Maybe its not used anyway. I am asking you
> this. But if it is used, could it be possible to restrict it to 1.0?
I think A itself could do that.
> Remember that B and C are 3rd party plugins and that both plugin
> versions need to be in the plugins folder because another plugin needs
> them.
If B and C are singletons and other plugins specific require C 2.0 but
you want C 1.0 I think you'll find someone is a loser.
>
> A bit complicated, I know.
Theory and practice don't always coincide. Test, test, test....


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:ID of default font for TableViewers
Next Topic:[p2] Re: uninstalling a plugin
Goto Forum:
  


Current Time: Sat Aug 10 09:21:44 GMT 2024

Powered by FUDForum. Page generated in 0.03252 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top