Bug 20867 - Mutiple extensions with identical content confuse eclipse.
Summary: Mutiple extensions with identical content confuse eclipse.
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 20910
Blocks:
  Show dependency tree
 
Reported: 2002-06-23 20:46 EDT by Peter Manahan CLA
Modified: 2009-08-18 16:43 EDT (History)
3 users (show)

See Also:


Attachments
Sample Extensions (28.29 KB, application/zip)
2002-06-23 20:47 EDT, Peter Manahan CLA
no flags Details
Post -initialize screen cap of config (16.49 KB, image/gif)
2002-06-23 20:56 EDT, Peter Manahan CLA
no flags Details
Site used for testcase (2.84 KB, application/zip)
2002-06-23 21:02 EDT, Peter Manahan CLA
no flags Details
Current config after updating feature to 1.2.0 (17.49 KB, image/gif)
2002-06-23 21:06 EDT, Peter Manahan CLA
no flags Details
Cap of the about dialog showing 2 plugins. Same id same version loaded. (33.52 KB, image/gif)
2002-06-23 21:07 EDT, Peter Manahan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Manahan CLA 2002-06-23 20:46:44 EDT
It is going to be possible to have multiple products shipping extensions that
containing the same features. When these are linked into 1 eclipse workbench
eclipse becomes really confused. It shows multiple identical features and 
allows multiple versions of plugins to be loaded.

I have attached the extensions I was using.
Comment 1 Peter Manahan CLA 2002-06-23 20:47:32 EDT
Created attachment 1557 [details]
Sample Extensions
Comment 2 Peter Manahan CLA 2002-06-23 20:54:02 EDT
Extract the extensions to a directory.
in a fresh eclipse install create a links directory and 4 link files.
for example
ext.link
   path=f:\\exten\\ext
ext1.link
   path=f:\\exten\ext2

etc for the other 2 extentions

use eclipse -initialize. start eclipse and go to the update manager. Open the 
current configuration and open each site listed. Should show multiple features 
added


Comment 3 Peter Manahan CLA 2002-06-23 20:56:38 EDT
Created attachment 1558 [details]
Post -initialize screen cap of config
Comment 4 Peter Manahan CLA 2002-06-23 21:02:19 EDT
Created attachment 1559 [details]
Site used for testcase
Comment 5 Peter Manahan CLA 2002-06-23 21:05:28 EDT
Now unzip the attached site. Open the update manager and create a new site 
bookmark pointing to this site. Expand it when done an Select
"An Extra Feature For Kicks 1.2". Install/Update it. use the defaults.

Upon restart open the Current Configuration again and one of the features is 
updated.
Open the about dialog select plugins. Page to the bottom and example "Plugin 
No 3" Notice that there are 2 versions of them.

Comment 6 Peter Manahan CLA 2002-06-23 21:06:18 EDT
Created attachment 1560 [details]
Current config after updating feature to 1.2.0
Comment 7 Peter Manahan CLA 2002-06-23 21:07:03 EDT
Created attachment 1561 [details]
Cap of the about dialog showing 2 plugins. Same id same version loaded.
Comment 8 Peter Manahan CLA 2002-06-23 21:08:21 EDT
contents of .log from previous events.

!SESSION Jun 23, 2002 20:53:46.569 --------------------------------------------
-
java.version=1.3.1_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86 -initialize -install 
file:F:/exttest/prod/eclipse/
!ENTRY org.eclipse.core.runtime 2 1 Jun 23, 2002 20:53:46.569
!MESSAGE Problems encountered loading the plug-in registry.
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 20:53:46.569
!MESSAGE Two plug-ins found with the same id: "pluginsame". Ignoring duplicate 
at "file:f:/exttest/ext2/eclipse/plugins/pluginsame/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 20:53:46.569
!MESSAGE Two plug-ins found with the same id: "ext.feature.one". Ignoring 
duplicate at "file:f:/exttest/ext/eclipse/plugins/ext.feature.one/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 20:53:46.569
!MESSAGE Two plug-ins found with the same id: "plugin1". Ignoring duplicate 
at "file:f:/exttest/ext/eclipse/plugins/plugin1/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 20:53:46.569
!MESSAGE Two plug-ins found with the same id: "plugin2". Ignoring duplicate 
at "file:f:/exttest/ext/eclipse/plugins/plugin2/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 20:53:46.579
!MESSAGE Two plug-ins found with the same id: "plugin3". Ignoring duplicate 
at "file:f:/exttest/ext/eclipse/plugins/plugin3/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 20:53:46.579
!MESSAGE Two plug-ins found with the same id: "pluginsame". Ignoring duplicate 
at "file:f:/exttest/ext/eclipse/plugins/pluginsame/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 20:53:46.579
!MESSAGE Two plug-ins found with the same id: "ext.feature.two". Ignoring 
duplicate at "file:f:/exttest/ext3/eclipse/plugins/ext.feature.two/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 20:53:46.579
!MESSAGE Two plug-ins found with the same id: "plugin4". Ignoring duplicate 
at "file:f:/exttest/ext3/eclipse/plugins/plugin4/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 20:53:46.579
!MESSAGE Two plug-ins found with the same id: "plugin5". Ignoring duplicate 
at "file:f:/exttest/ext3/eclipse/plugins/plugin5/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 20:53:46.579
!MESSAGE Two plug-ins found with the same id: "plugin6". Ignoring duplicate 
at "file:f:/exttest/ext3/eclipse/plugins/plugin6/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 20:53:46.579
!MESSAGE Two plug-ins found with the same id: "pluginsame". Ignoring duplicate 
at "file:f:/exttest/ext3/eclipse/plugins/pluginsame/plugin.xml".
!SESSION Jun 23, 2002 21:00:40.214 --------------------------------------------
-
java.version=1.3.1_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86 -install 
file:F:/exttest/prod/eclipse/
!ENTRY org.eclipse.core.runtime 2 1 Jun 23, 2002 21:00:40.214
!MESSAGE Problems encountered loading the plug-in registry.
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 21:00:40.214
!MESSAGE Two plug-ins found with the same id: "pluginsame". Ignoring duplicate 
at "file:f:/exttest/ext2/eclipse/plugins/pluginsame/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 21:00:40.214
!MESSAGE Two plug-ins found with the same id: "ext.feature.one". Ignoring 
duplicate at "file:f:/exttest/ext/eclipse/plugins/ext.feature.one/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 21:00:40.214
!MESSAGE Two plug-ins found with the same id: "plugin1". Ignoring duplicate 
at "file:f:/exttest/ext/eclipse/plugins/plugin1/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 21:00:40.214
!MESSAGE Two plug-ins found with the same id: "plugin2". Ignoring duplicate 
at "file:f:/exttest/ext/eclipse/plugins/plugin2/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 21:00:40.214
!MESSAGE Two plug-ins found with the same id: "plugin3". Ignoring duplicate 
at "file:f:/exttest/ext/eclipse/plugins/plugin3/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 21:00:40.214
!MESSAGE Two plug-ins found with the same id: "pluginsame". Ignoring duplicate 
at "file:f:/exttest/ext/eclipse/plugins/pluginsame/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 21:00:40.214
!MESSAGE Two plug-ins found with the same id: "ext.feature.two". Ignoring 
duplicate at "file:f:/exttest/ext3/eclipse/plugins/ext.feature.two/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 21:00:40.214
!MESSAGE Two plug-ins found with the same id: "plugin4". Ignoring duplicate 
at "file:f:/exttest/ext3/eclipse/plugins/plugin4/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 21:00:40.214
!MESSAGE Two plug-ins found with the same id: "plugin5". Ignoring duplicate 
at "file:f:/exttest/ext3/eclipse/plugins/plugin5/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 21:00:40.214
!MESSAGE Two plug-ins found with the same id: "plugin6". Ignoring duplicate 
at "file:f:/exttest/ext3/eclipse/plugins/plugin6/plugin.xml".
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Jun 23, 2002 21:00:40.214
!MESSAGE Two plug-ins found with the same id: "pluginsame". Ignoring duplicate 
at "file:f:/exttest/ext3/eclipse/plugins/pluginsame/plugin.xml".
Comment 9 Peter Manahan CLA 2002-06-23 21:09:34 EDT
workspace platform.cfg file

# Sun Jun 23 21:00:38 EDT 2002
version=1.0

stamp=1025066449617
stamp.features=1099710809
stamp.plugins=1026148334472
bootstrap.org.eclipse.core.boot=platform:/base/plugins/org.eclipse.core.boot_2.
0.0/

feature.default.id=org.eclipse.platform

feature.0.id=org.eclipse.platform
feature.0.primary=true
feature.0.version=2.0.0
feature.0.application=org.eclipse.ui.workbench
feature.0.root.0=platform:/base/plugins/org.eclipse.platform_2.0.0/

feature.1.id=org.eclipse.platform.source
feature.1.version=2.0.0

feature.2.id=ext.feature.two
feature.2.version=1.0.0

feature.3.id=org.eclipse.platform.win32
feature.3.version=2.0.0

feature.4.id=ext.url.feature
feature.4.version=1.0.0

feature.5.id=org.eclipse.jdt.source
feature.5.version=2.0.0

feature.6.id=org.eclipse.pde
feature.6.version=2.0.0

feature.7.id=org.eclipse.platform.win32.source
feature.7.version=2.0.0

feature.8.id=org.eclipse.jdt
feature.8.version=2.0.0

feature.9.id=ext.feature.one
feature.9.version=1.0.0

feature.10.id=org.eclipse.sdk.win32
feature.10.version=2.0.0

feature.11.id=bug.feature.lic
feature.11.version=1.0.0

feature.12.id=ext.feature.one.extra
feature.12.version=1.0.0

site.0.url=file:f:/exttest/ext1/eclipse/
site.0.stamp=1026065768214
site.0.stamp.features=-1362660081
site.0.stamp.plugins=-1025697865422
site.0.updateable=true
site.0.linkfile=F:/exttest/prod/eclipse/links/ext1.link
site.0.policy=USER-EXCLUDE

site.1.url=file:f:/exttest/ext2/eclipse/
site.1.stamp=1276344495
site.1.stamp.features=1026328707721
site.1.stamp.plugins=1026003437164
site.1.updateable=true
site.1.linkfile=F:/exttest/prod/eclipse/links/ext2.link
site.1.policy=USER-EXCLUDE

site.2.url=file:f:/exttest/ext/eclipse/
site.2.stamp=-1860148480
site.2.stamp.features=1024353340749
site.2.stamp.plugins=-1025943178459
site.2.updateable=true
site.2.linkfile=F:/exttest/prod/eclipse/links/ext.link
site.2.policy=USER-EXCLUDE

site.3.url=platform:/base/
site.3.stamp=1503856088
site.3.stamp.features=-1025927531272
site.3.stamp.plugins=1025470452516
site.3.updateable=true
site.3.policy=USER-EXCLUDE

site.4.url=file:f:/exttest/ext3/eclipse/
site.4.stamp=822746836
site.4.stamp.features=1025347800938
site.4.stamp.plugins=1025520598231
site.4.updateable=true
site.4.linkfile=F:/exttest/prod/eclipse/links/ext3.link
site.4.policy=USER-EXCLUDE
eof=eof
Comment 10 Peter Manahan CLA 2002-06-23 21:11:03 EDT
This was on eclipse 20020621 intergration build on IBM JDK1.3.1_02
Comment 11 Peter Manahan CLA 2002-06-23 21:14:07 EDT
Making critical from our point of view now until it can be determined why this 
is happening it completely breaks the product merge strategy as the platform 
seems to become indeterminate in this scenario.
Comment 12 Vlad Klicnik CLA 2002-06-24 14:18:16 EDT
As odd as it may seem, this is working as expected. Below is an explanation of 
what is happening, and some of the rationale why it is working this way.

First of all, there are 2 separate mechanisms at play here ... the update 
configuration support, and the runtime registry loading. I'll tackle these 
separately.

The configuration support basically handles features on a per-site basis. So if 
the same feature is installed on multiple sites, it will appear that way in the 
configuration views. We have decided not to attempt to unconfigure the 
duplicates, because this leads to various difficulties with native uninstall 
(eg. would have to keep track of the fact that we unconfigured a feature as a 
duplicate, so that if the configured one got blown away by a native uninstall 
the unconfigured duplicate would need to be automagically reconfigured again to 
keep things whole). Generally a messy area. 

So the approach we took is to keep the duplicates, and contribute the 
duplicates to the runtime to sort out. This is why you see the log entries. 
Note, that the logging and extra startup processing (parsing extra plugin.xml) 
only happens on the first startup after a change .... after that the registry 
is cached so there is no impact (logging or performance-wise). We could filter 
the duplicates out, currently we don't (one could argue it is actually a useful 
not to filter and show the duplicates in the log).

When you update one of the duplicate features, we currently do not update all 
the duplicates. This could be viewed as a problem (am openning a separate 
defect to track this). So the result is that both the original and the updated 
plugin versions are contributed to the runtime. 

The registry loading mechanism implements a set of binding rules that determine 
which versions of a plugin get used if there are multiple choices available. In 
general it selects the "best match" given prerequisite constrains. The only 
time it allows multiple versions of a plugin to be loaded concurrently is when 
there are multiple conflicting prereqs on a plugin (ie. cannot be resolved by 1 
target), and the target plugin only contributes <runtime> libraries (ie. does 
not contribute anything "interesting" to the desktop, such as extensions, 
extension point declaration). The rationale for this was not force cross-
vendor/ cross-product coordination of the levels of runtime libraries required 
by plugins (xerces is a an example of this).

It turns out your plugin3 falls into this category ... only contributes 
<runtime> (empty at that), and extraplugin prereqs plugin3 1.1.0 or equivalent, 
and plugin4 prereqs 1.0.0 or equivalent. So the runtime allowed both versions 
of plugin3 to be loaded.

I made a simple modification to both versions of plugin3 ... added a 
declaration for an extension point, and restarted. This time, only plugin3 
1.1.0 got loaded, and plugin4 got disabled (because it requires plugin3 1.0.0 
and the runtime had to make a choice). The configuration view for the feature 
containing plugin4 showed it broken (red X, missing plugin at runtime) and the 
features containing plugin3 1.0.0 had a warning (different version than the one 
referenced was running). This is what I'd expect given the test case.

So this is basically working as expected.
Comment 13 Peter Manahan CLA 2002-06-26 20:35:29 EDT
I understand why it works this way now. Don't like it, but understand it. As 
long as the related bug http://dev.eclipse.org/bugs/show_bug.cgi?id=20910 is 
fixed it should be ok for now.

I think though that it needs to be reviewed again for the next major release. 
The whole area of merged products based on eclipse has pushed the current 
update/config implementation over the edge.
Comment 14 Greg Adams CLA 2002-07-08 12:22:43 EDT
I concur with Peter.
Comment 15 Dejan Glozic CLA 2003-02-02 12:42:36 EST
Related bug 20910 has been fixed. Further work on the issue of clashing 
versions in multiple extensions will be done in release 2.2.
Comment 16 DJ Houghton CLA 2009-08-18 16:40:25 EDT
[LATER->WONTFIX] The "LATER" bugzilla resolution is being removed so reopening
to mark as WONTFIX.
Comment 17 DJ Houghton CLA 2009-08-18 16:43:13 EDT
[LATER->WONTFIX] The "LATER" bugzilla resolution is being removed so reopening
to mark as WONTFIX.