| Summary: | [region] all singletons are treated as non-singletons | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Thomas Watson <tjwatson> | ||||||
| Component: | Components | Assignee: | Thomas Watson <tjwatson> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | b.kapukaranov, glyn.normington | ||||||
| Version: | unspecified | Flags: | glyn.normington:
review+
|
||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | 344631 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
Yes, I think the normal digraph visibility rules should apply here for consistency. I will take a shot at implementing this. Thanks Tom. Created attachment 194588 [details]
Patch + unit tests
Here is what I was thinking. Simply using the same logic as filterMatches except if the region cannot be found for the singleton bundle then retain all collisions. Still need to write some system tests.
Glyn, could you give me a review. I would like to release this later today after writing some system tests, but wanted to get a review from you before you leave for the day. (In reply to comment #4) > Created attachment 194588 [details] > Patch + unit tests > > Here is what I was thinking. Simply using the same logic as filterMatches > except if the region cannot be found for the singleton bundle then retain all > collisions. Still need to write some system tests. Looks like a good fix to me. In writing some system tests I found bug344631 which blocks this bug from being fixed properly. Created attachment 194646 [details] Patch + unit and system tests The system test will fail until bug344631 is fixed. patch released. |
In org.eclipse.equinox.internal.region.hook.RegionResolverHook we have the following method public void filterSingletonCollisions(BundleCapability singleton, Collection<BundleCapability> collisionCandidates) { collisionCandidates.clear(); // XXX temporary hack in lieu of Borislav's changes } Clearing all collisionCandidates will cause all singleton bundles to be treated as non-singletons. At a minimum we must keep all collision candidates that are in the same region as the specified singleton. We may want to consider candidates in other regions that are visible to the region containing the singleton.