Twitter github

p2 and penance

As some of you know, Eclipse 3.4M6 is on the horizon. This is going to be a big and important milestone as it contains a revamped update (provisioning) system called p2. This is a crucial move for Eclipse as the old Update system which I was intimately familiar with (IFeature.STATUS_UNHAPPY anyone ;p) was antiquated… it was around before OSGi was put in as the basis of the Eclipse runtime. It’s time for a change…

What do you need to know? Well, p2 is pretty advanced compared to Update and the p2 team has done a good job with wiki-based documentation. However, for end users, there will be fairly little change in terms of what you see. The two most important things for end users I can think of is the work of creating a simpler Update UI (a work in progress) and a workflow change in how you add plug-ins to Eclipse. Do you remember that old technique of just dropping plug-ins in the plugins directory and having the old Update promiscuously install them? p2 has matured a bit and is less promisicous… however, there’s is a new ‘dropins’ folder where you can put your update sites and zip files:

The 3.4M6 release of Eclipse also signifies time for some penance. We have sinned against one of the greatest software engineering principles… eating our own dog food:

In the past, most people when they moved to a new version of some Eclipse project… we simply grabbed a new zip… unpacked it along with a new SDK or used the clever technique of link folders.

This is wrong.

It’s time to be using the p2 facilities to perform simple build-to-build updates. I have been doing this with the SDK recently and it works out nicely. When there’s a new update, I simply get the files I need using p2 and it does all the magic for me. The saying is that “old habits die hard,” and this is one habit that needs to change. In order to ensure the success of p2, it’s time to start eating our own dog food when it comes to updating plug-ins.

  • AlBlue

    It would be great if we could have platform-specific locations for dropins folders. /Library/Eclipse/Dropins and ~/Library/Eclipse/Dropins would be excellent places to allow a user to put their own specific bundles.

  • AlBlue

    It would be great if we could have platform-specific locations for dropins folders. /Library/Eclipse/Dropins and ~/Library/Eclipse/Dropins would be excellent places to allow a user to put their own specific bundles.

  • David Carver

    Does P2 delete the old files or are they still kept around. Because if they are still kept around, then we have bloat of the installation folder again. I haven’t tested P2 yet…waiting until M6 is out before I jump in, but it really needs to delete the old stuff if possible.

  • David Carver

    Does P2 delete the old files or are they still kept around. Because if they are still kept around, then we have bloat of the installation folder again. I haven’t tested P2 yet…waiting until M6 is out before I jump in, but it really needs to delete the old stuff if possible.

  • Chris Aniszczyk (zx)

    I think by default, p2 will delete old files… but it has the ability to plug in different types of “garbage collectors” if you need to be more flexible…

    cool stuff eh?

  • Eugene Kuleshov

    My biggest struggle with p2 is how to configure my extension locations with p2. I use over 30 extension locations that I am reusing across multiple Eclipse instances (from 3.2 to 3.4) and I really don’t want to have the same plugins copied in many places. It would be great if someone could write up some kind of migration strategy or side by side comparison document how old update manager and extension locations features are handled in p2.

  • Chris Aniszczyk (zx)

    I think by default, p2 will delete old files… but it has the ability to plug in different types of “garbage collectors” if you need to be more flexible…cool stuff eh?

  • Eugene Kuleshov

    My biggest struggle with p2 is how to configure my extension locations with p2. I use over 30 extension locations that I am reusing across multiple Eclipse instances (from 3.2 to 3.4) and I really don’t want to have the same plugins copied in many places. It would be great if someone could write up some kind of migration strategy or side by side comparison document how old update manager and extension locations features are handled in p2.

  • Anonymous

    Well, I got all excited, and tried to use p2 to get the latest stream build – but, of course, I’m on OSX, which is the 3rd class citizen and gets no build???

    http://download.eclipse.org/eclipse/equinox/drops/S-3.4M5-200802071530/index.php

    – no agent for OSX 🙁

  • Anonymous

    Well, I got all excited, and tried to use p2 to get the latest stream build – but, of course, I’m on OSX, which is the 3rd class citizen and gets no build???http://download.eclipse.org/eclipse/equinox/drops/S-3.4M5-200802071530/index.php- no agent for OSX 🙁

  • Anonymous

    Oh, I tell a fib – I can see one in the nightly drop (http://download.eclipse.org/eclipse/equinox/drops/N20080322-2000/index.php)

    –whingeoff–…

  • Anonymous

    Oh, I tell a fib – I can see one in the nightly drop (http://download.eclipse.org/eclipse/equinox/drops/N20080322-2000/index.php)–whingeoff–…

  • Anonymous

    I’m with eugene on this. All the previous problems with eclipse update in practice were solved with extension locations. Unfortunately, the eclipse UI went out of its way to make using them impossible to discover. However, with the new p2, I can’t seem to make anything like extension locations work at all.

    For example, I just installed eclipse3.4M6 and then unzipped dtp1.6M6, gef3.4.0M6, wtp3.0M5, emf2.4.0M6, and tptp4.5.0M5 into separate directories. I tried using .link files in the dropins directory, but then elcipse startup takes a several minutes (as opposed to seconds) and it still will not load the plugins.

  • Anonymous

    I’m with eugene on this. All the previous problems with eclipse update in practice were solved with extension locations. Unfortunately, the eclipse UI went out of its way to make using them impossible to discover. However, with the new p2, I can’t seem to make anything like extension locations work at all. For example, I just installed eclipse3.4M6 and then unzipped dtp1.6M6, gef3.4.0M6, wtp3.0M5, emf2.4.0M6, and tptp4.5.0M5 into separate directories. I tried using .link files in the dropins directory, but then elcipse startup takes a several minutes (as opposed to seconds) and it still will not load the plugins.