Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316031 - Is singleton defined in the right place?
Summary: Is singleton defined in the right place?
Status: CLOSED DUPLICATE of bug 277523
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-07 13:16 EDT by John Arthorne CLA
Modified: 2010-06-07 13:27 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2010-06-07 13:16:14 EDT
3.6

From looking at bug 315853, it seemed wrong that two completely unrelated IU's clashed with each other in this way. Namespacing should allow us to avoid unrelated IU's interfering with each other. However, namespaces are only on provided capabilities, but "singletonness" is defined on the IU. If the singleton attribute was defined on the provided capability instead, we wouldn't have such collisions. For example imagine we had a singleton bundle and a feature with the same IU ID:

Bundle x:
 provided capability: "org.eclipse.equinox.p2.iu", "x"
 provided capability: "osgi.bundle", "x", singleton=true

Feature x:
 provided capability: "org.eclipse.equinox.p2.iu", "x"
 provided capability: "org.eclipse.update.feature", "x", singleton=true

With this scheme the bundle and feature IU's have the same ID, but it's ok because one provides a singleton bundle and the other provides a singleton feature.

Maybe it's too late to rethink this but wanted to open the bug for discussion of whether this makes any sense (obviously for post 3.6)
Comment 1 John Arthorne CLA 2010-06-07 13:27:12 EDT
I see Pascal raised the exact same question during last year's end-game...

*** This bug has been marked as a duplicate of bug 277523 ***