Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326502 - Tons of errors after plug-in import
Summary: Tons of errors after plug-in import
Status: VERIFIED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: 3.7 M3   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 05:34 EDT by Dani Megert CLA
Modified: 2010-10-05 04:53 EDT (History)
6 users (show)

See Also:


Attachments
dev patch (1.69 KB, patch)
2010-10-04 17:30 EDT, 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 Dani Megert CLA 2010-09-29 05:34:56 EDT
Argh, once again!

Works in N20100922-2000, broken since N20100923-2000 and in latest I-build.

1. start with new workspace
2. disable all plug-ins in the target
3. check out 'org.eclipse.search' from CVS
4. import all required bundles as binary projects
5. in case this doesn't result in compile errors, repeat 4.

Close + reopen the project fixes the issue.


Please write a test case that covers that scenario! Each time I run into this it wastes 1-2 hours of my time.
Comment 1 Darin Wright CLA 2010-09-29 09:37:15 EDT
I followed the steps once with no problem, repeated step 5 and had no problems. Looking at code changes in CVS, I don't see any changes related to binary bundle import. The PDE team has been working on API tools.
Comment 2 Darin Wright CLA 2010-09-29 09:37:40 EDT
(In reply to comment #1)
> repeated step 5 and had no problems.

Sorry, repeated step 4.
Comment 3 Darin Wright CLA 2010-09-29 09:41:34 EDT
The second attempt had 3 errors:


* API analysis aborted for 'org.eclipse.search' since its build path is incomplete	org.eclipse.search		line 0	Fatal Problem

* The project was not built since its build path is incomplete. Cannot find the class file for org.eclipse.swt.graphics.Image. Fix the build path then try building this project	org.eclipse.search		Unknown	Java Problem

* The type org.eclipse.swt.graphics.Image cannot be resolved. It is indirectly referenced from required .class files	SearchUI.java	/org.eclipse.search/search/org/eclipse/search/ui	line 1	Java Problem
Comment 4 Darin Wright CLA 2010-09-29 09:48:15 EDT
Following Dani's steps, I get no problems, but if I change the steps slightly I get a few problems (as shown above). Steps - note steps 2/3 are reversed:

1. start with new workspace
2. check out 'org.eclipse.search' from CVS
3. disable all plug-ins in the target
4. import all required bundles as binary projects
Comment 5 Dani Megert CLA 2010-09-30 02:02:24 EDT
Any ETA on this?
Comment 6 Curtis Windatt CLA 2010-10-01 15:47:41 EDT
I tried both Dani's steps and Darin's in I20100915-2024 and using the latest PDE code from HEAD.  In all cases everything worked as expected.  When the plug-ins weren't available, there were errors, when the plug-ins were available in the target or after importing, the errors go away.
Comment 7 Curtis Windatt CLA 2010-10-01 16:05:00 EDT
Also couldn't reproduce in I20100928-1200.  There are no changes in the import code related to this.  There have been few changes to PDE UI in general.
Comment 8 Dani Megert CLA 2010-10-02 03:46:22 EDT
> were available in the target 
There should always be none in the target as all have to be disabled in step 2.

>I tried both Dani's steps and Darin's in I20100915-2024
Obviously it works in that build given I wrote in comment 0 that it still worked in N20100922-2000.

>Also couldn't reproduce in I20100928-1200.
I don't know whether everything from HEAD is in there but I just tried again EXACTLY following the steps from comment 0 against N20100928-2000: the first import (step 4) still worked but on the next import I got errors. In case you don't get the errors, repeat until you get the compile errors.
Comment 9 Darin Wright CLA 2010-10-04 12:31:35 EDT
On secondary import operations I sometimes get errors. When an error appears, it looks as though the plug-in classpath container is missing a couple entries (bundles). Closing/opening the project resolves the issue.
Comment 10 Darin Wright CLA 2010-10-04 15:02:02 EDT
Olivier, has anything changed recently with the timing or how Java classpath containers are resolved? We have case where the plug-in classpath container appears incomplete, but closing/re-opening the project fixes the problem.
Comment 11 Olivier Thomann CLA 2010-10-04 15:04:53 EDT
I am not aware of this.
Jay, any idea ?
Comment 12 Darin Wright CLA 2010-10-04 17:26:49 EDT
The problem appears to be related to a change made in OSGi for bug 326011.

In Tom's words: "in the resolver we used to automatically merge in any removal pendings for re-resolving when doing incremental resolves". The net effect is that not all bundles were removed from the state when doing an incremental resolve, and we ended up with stale bundle descriptions in the model.

Tom has provided a patch which he will release to the I-build that restores the old behavior dor dev mode (PDE uses the state/resolver in dev mode).
Comment 13 Thomas Watson CLA 2010-10-04 17:29:47 EDT
I'll take this one.  It is related to changes in bug326011

In the fix to that bug I removed code that was aggressively flushing descriptions in the removal pending state.  This is not something we want to do at runtime and I could not think of any reason to be this aggressive, so I removed the bit of code.  I will revert the behavior for development mode (which is how PDE uses the resolver).
Comment 14 Thomas Watson CLA 2010-10-04 17:30:34 EDT
Created attachment 180213 [details]
dev patch
Comment 15 Thomas Watson CLA 2010-10-04 17:35:53 EDT
I released the patch.  Darin also entered bug326974 against PDE to discuss if PDE should be more explicit about resolving bundles which it has updated in the state instead of depending on auto flushing of removal pending descriptions.
Comment 16 Dani Megert CLA 2010-10-05 04:53:31 EDT
Verified in N20101004-2000.
Thanks for fixing this!