Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 218395

Summary: [prov] Test workspace not using reference: URLs
Product: [Eclipse Project] PDE Reporter: John Arthorne <john.arthorne>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: curtis.windatt.public, Curtis_Windatt, darin.eclipse, pascal, tjwatson
Version: 3.4   
Target Milestone: 3.4 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description John Arthorne CLA 2008-02-08 17:48:36 EST
3.4 M5

 1) Download admin UI
 2) Provision an SDK
 3) Start SDK, check out some projects, and launch a test workspace

-> It hangs for a long while before starting the workspace

 4) Make a code change in some project
 5) Shutdown and restart the test workspace

-> It is running the old copy of the code.

With some help from Tom, I finally tracked this down and it looks like we're not using reference URLs in the test workspace. Thus on startup the framework copies the entire target (including the contents of my workspace) into configuration/org.eclipse.osgi/bundles...

The bundles.txt from the test workspace has absolute URLs, which I suspect is the root of the problem:

org.eclipse.ecf.identity,1.3.0.qualifier,file:/C:/1target/provmiddle/org.eclipse.ecf.core.identity/,4,false

This makes the self-hosting SDK provisioned by p2 virtually unusable for plugin development.
Comment 1 Pascal Rapicault CLA 2008-02-08 20:45:01 EST
reference: is never written into the bundles.txt. Instead it is simpleconfigurator that decides whether or not the installation should be done by reference.

To workaround the problem, you can add
  -Dorg.eclipse.equinox.simpleconfigurator.useReference=true

as a VM arg. 

I would say that the bug is on PDE, since normally PDE reuses the properties that contained in the config.ini of the target.

Curtis, Darin, does that make sense?
Comment 2 Thomas Watson CLA 2008-02-10 12:27:12 EST
It does sound like a bug in PDE.  I agree with Pascal that PDE should reuse the properties contained in the config.ini of the target.

But is not using reference URLs the correct default?  p2 is all about shared bundle pools, it seems like the default should be to use reference URLs with the option to disable reference URLs.
Comment 3 John Arthorne CLA 2008-02-10 16:59:16 EST
Adding the VM arg to my launch configurations didn't seem to help. I'm going to back up to an older build.
Comment 4 Pascal Rapicault CLA 2008-02-11 09:33:31 EST
Simpleconfigurator predates p2 and we always intended it to be framework agnostic, thus explaining why using reference: URL was not an appropriate default behavior. Of course since we don't know of any other users we could always set it to use reference URLs by default simplifying things.
Comment 5 Pascal Rapicault CLA 2008-02-11 16:18:10 EST
I have released in HEAD a fix making the use of reference URL the default in simpleconfigurator.

I'm now moving this bug to PDE to verify that the initial problem is being addressed.
Comment 6 Curtis Windatt CLA 2008-02-11 16:32:22 EST
So you want PDE to add 'reference:' to the entries in the bundles.txt when writing it at launch, unless org.eclipse.equinox.simpleconfigurator.useReference is set to false in the config.ini?

Do I need to do the same for the source.bundles.txt?
Comment 7 John Arthorne CLA 2008-02-11 17:04:42 EST
No, you don't need to munge the entries in bundles.txt. See comment #1 - I think the concern is that there may be a general PDE problem where these properties are not being forwarded from the target platform to the running target workbench that is launched. I.e., when self-hosting on p2, eclipse.ini contains:

-Dorg.eclipse.equinox.simpleconfigurator.useReference=true

But when I launch a target platform this property is missing, which is the source of the problem.
Comment 8 John Arthorne CLA 2008-02-13 16:16:15 EST
Sorry for the churn, this was due to bug 149994. I had added an extra VM argument on the command line last week for doing profiling. Doing this in a p2 world means everything is broken because vm arguments in eclipse.ini are subsequently ignored. I have entered bug 218874 to suggest we encode these arguments in config.ini to ensure they are not lost.

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