Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 217317 - Need an option to bypass "uses" constraint checks
Summary: Need an option to bypass "uses" constraint checks
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-31 14:16 EST by Thomas Watson CLA
Modified: 2009-02-28 08:21 EST (History)
2 users (show)

See Also:


Attachments
patch (2.11 KB, patch)
2008-02-01 13:45 EST, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2008-01-31 14:16:08 EST
See bug 216934.

Instead going forcing all bundles in eclipse to forget about the Export-Package "uses" clause to avoid a performance issue, we should add an option to bypass the extra checks all together.

There are two options we can consider:

1) Simply ignore the uses clauses altogether and allow for an inconsistent class space to be wired together.

2) Use the first combination of constraint solutions and unresolve any bundles that cause an inconsistent class space.

The first option seems a bit dangerous but may be necessary in some cases.  I like the second option because it at least ensures that a consistent class space is resolved.  But it may not allow for the maximum number of bundles to be resolved because we just used the first solution which may not be the optimal one.

I propose adding an option osgi.resolver.usesMode with values of "ignore", "tryFirst", "tryAll".  

ignore - act as if no bundles specified any "uses" clauses
tryFirst - use the first solution available, if there are conflicts in the first solution then unresolve the conflicted bundles
tryAll - search all possible solutions until a solution is found with no conflicts is found.  If no such solution exists use the one with the least amount of conflicts.
Comment 1 Thomas Watson CLA 2008-02-01 13:45:50 EST
Created attachment 88616 [details]
patch

Patch to add new options for uses processing.
Comment 2 Thomas Watson CLA 2008-02-01 14:14:56 EST
Patch released.