| Dangers of upgrading packages in the import section [message #133869] |
Mon, 29 June 2009 02:49 |
Eclipse User |
|
|
|
Consider the following example:
org.basic.RC
|_______ org.basic.RA[1.0.0, 2.0.0)
|_______ org.basic.RB[1.0.0, 2.0.0)
|_________ org.basic.RA[1.0.0, 2.0.0)
package org.basic.RA;
public interface IxFromRA{
public Integer getValue();
}
package org.basic.RB;
public interface IxFromRB{
public boolean compute(IxFromRA input);
}
+ As you can see an interface from org.basic.RA is in the public API of
org.basic.RB.
+ If I changed IxFromRA to return Float in getValues() and called it
org.basic.RA(2.0.0) org.basic.RC has no means of using this new package
unless org.basic.RB also makes a new release and upgrades to it. If it
did then it would pass the new IxFromRA into IxFromRB which is still
expecting the older IxFromRA and we will get some variant of LinkageError
at runtime.
+ The question really is, when there are 100s of bundles how does one
detect conditions like this when upgrading imported packages. Frankly I
find this a deal breaker for OSGI and am surprised more people are not
complaining. Am I missing something colossal here?
Regards
banks
PS: I have cross posted this in osgi-dev and pde mainly out of unawareness
whats the correct audience for this question.
|
|
|
Powered by
FUDForum. Page generated in 0.02698 seconds