Bug 248871 - Building update site depends on order of bundles in site.xml
Summary: Building update site depends on order of bundles in site.xml
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2008-09-28 13:01 EDT by Pavel Krupets CLA
Modified: 2009-02-19 23:29 EST (History)
3 users (show)

See Also:


Attachments
org.eclipse.pde.core.patch (977 bytes, patch)
2009-02-18 10:50 EST, Chris Aniszczyk CLA
no flags Details | Diff
org.eclipse.pde.core.patch (2.31 KB, patch)
2009-02-18 16:21 EST, Chris Aniszczyk CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Krupets CLA 2008-09-28 13:01:17 EDT
Build ID: M20080911-1700

Steps To Reproduce:
1. Add all features/plugins (1st add one which is used by others (common plugin) and then add features/plugins which use it)
2. Change common plugin version. Remove it from updater list and add new one (with new version). It will be added to the end of the site.xml.
3. Try to build. It will fail.
4. Manually move common plugin configuration in site.xml to the 1st position. Everything is okay.


More information:
- Maybe order can be calculated dynamically? It's not that difficult it should be a DAG.
- Or at least allow users to reorder plugins/features.
Comment 1 DJ Houghton CLA 2009-02-09 09:32:22 EST
Old Summary: Updater project fails to build all features/plugins...
Comment 2 John Arthorne CLA 2009-02-11 15:45:18 EST
I believe this site builder is in PDE. However, I couldn't reproduce the problem. Can you clarify the steps, since you talk about adding/removing a plugin from a site.xml, but sites can only contain features.
Comment 3 Andrew Niefer CLA 2009-02-18 10:31:02 EST
Features are compiled in order, depth first.
However, starting in 3.5M3, flattenDependencies (bug 212467) could be used here.
For UI use BuildScriptGenerator#setFlattenDependencies
Comment 4 Chris Aniszczyk CLA 2009-02-18 10:32:38 EST
What's the negative impact of doing this Andrew?
Comment 5 Andrew Niefer CLA 2009-02-18 10:45:45 EST
Actually, it probably won't be that easy.  Setting this property results in a separate compile script being generated "compile.<feature>.xml".

Currently UI is explicitly calling the feature's build.xml build.jars target (FeatureExportOperation#doExport calls to runScript).  It may also be calling the build.sources target.  Doing this compiles everything in-order, depth first.

To use the flattenDependencies, you would instead need to invoke the compile.<feature>.xml script (default target).  However, this compile script only calls build.jars, not build.sources, so if you want sources you would need a second call to the feature's build.xml as before but with just the build.sources target.
Comment 6 Chris Aniszczyk CLA 2009-02-18 10:50:02 EST
Created attachment 126033 [details]
org.eclipse.pde.core.patch

To start, we would enable this for every operation. This would solve quite a bit of problems for people.

The next step is to go over Andrew's comments to see what we can do.

Andrew, do you have sometime to look this over with me? I think this is a big win if we can fix this ordering problem with which I've seen quite a few people bit in the field.
Comment 7 Chris Aniszczyk CLA 2009-02-18 16:21:39 EST
Created attachment 126079 [details]
org.eclipse.pde.core.patch

An updated patch that takes Andrew's suggestion.

I need to do more testing before I'm confident in releasing.

Andrew, would have time to do some testing also? I'm trying to think of scenarios where  this would break someone.
Comment 8 Chris Aniszczyk CLA 2009-02-19 23:29:31 EST
done testing. Looks good from my end.

> 20090217

Let's see how this works in the next i-build!