Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Funny dependencies in p2.engine

I'll fix this. I don't want to reopen the old debate, but as an aside this struck me as an example where require bundle actually makes sense. To fix this I had to add quite a few imports of internal packages (listed below). This suggests that substitutability at the package level for intra-p2 dependencies is unlikely to ever work. I.e., if someone wanted to use our engine with a different implementation of the metadata API, they would also need an alternate implementation of all these internal packages with matching structure and behaviour. Also since we don't version internal packages or have a story for evolving internal package versions, these package dependencies are more brittle and less accurate than the old bundle import.

 org.eclipse.equinox.internal.p2.core.helpers,
 org.eclipse.equinox.internal.p2.metadata,
 org.eclipse.equinox.internal.p2.metadata.index,
 org.eclipse.equinox.internal.p2.metadata.repository,
 org.eclipse.equinox.internal.p2.metadata.repository.io,
 org.eclipse.equinox.internal.p2.persistence,
 org.eclipse.equinox.internal.provisional.p2.core.eventbus,
 org.eclipse.equinox.internal.provisional.p2.repository,




On Fri, Dec 3, 2010 at 11:14 AM, Jeff McAffer <jeff@xxxxxxxxxxxxxxxxx> wrote:
my thinking too.

On 2010-12-03, at 7:17 AM, Pascal Rapicault wrote:

> I can only think that this is a mistake.
>
> On 2010-12-02, at 3:37 PM, John Arthorne wrote:
>
>> While reviewing code with Dean we noticed org.eclipse.equinox.p2.engine had some unusual dependency practices in its manifest:
>>
>> - In many (but not all) cases, there is both a require bundle and import package for the same dependency
>> - Some of the dependencies expressed a very narrow range while others were larger:
>>
>> require bundle: org.eclipse.equinox.p2.core;bundle-version="[2.0.0,2.1.0)"
>> import package:  org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
>>
>> My question is, can anyone think of reasons we would need both package and bundle imports? I thought we had settled on only using package imports between p2 bundles. Also, I think the narrow range is overly conservative even in cases where we use friends or internals between p2 bundles. For example Dean was adding a new, fully compatible API in p2.core, which broke the above bundle dependency, requiring p2.engine to be changed for no good reason.
>>
>> John
>> _______________________________________________
>> p2-dev mailing list
>> p2-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/p2-dev
>
> _______________________________________________
> p2-dev mailing list
> p2-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/p2-dev

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev


Back to the top