Wednesday, June 12, 2013

A nasty bug in dropins - read it if you use them

The nature of dropins is that they were supposed to be a transitional mechanism between old update manager and P2. Dropins have more advantages that they were supposed to have, and one of them is truly easy management - just copy a plugin, and it will work (in most cases).

This time, however, a really nasty issue managed to get into Kepler. It was discovered about two weeks ago, when some of our Fedora packages started disappearing after updates.

We often get similar issues before final build of Fedora is released, so it did not looked seriously. But after a couple of days of checking our build process and testing I've found that:

If you deploy into dropins a plugin that is already installed using P2 director, your Eclipse goes bananas, especially if this plugin is a platform dependency.
The dropins mechanism will try to uninstall it, and then, depending on your configuration, will stop working, or will break your Eclipse.

The bug was reported in the Eclipse bugzilla, but it will most likely be shipped due to the bad timing in which it was discovered.

So beware of what you put into dropins - unless you want spend the same amount of time that I did trying to understand what's going on.

Monday, June 10, 2013

EclipseCon France - Wrap up

I had a pleasure to take part in the EclipseCon held for the first time in France. Here are is my main observation:
Java has more in common with javascript than continental breakfast with breakfast.

Also, for the first time, there was a true coming out of people adjusting and packaging inhouse flavour of Eclipse. A few of my live-recorded tweets:


So, it's all about having a few people in an organization that know tools, and prepare tools for others. It just looks like the idea of "bring your own device" policy was wrong. A corporation needs standards. Period. And it's much better to have a team designated only to free software management than allow your employees to invent the wheel again and again.

I wish all those eclipse builders contributed back!

What's more, I believe that the future belongs to those small, single-purposed IDEs, and kind of natural consequence will be equally precise a IDE in the browser, where you rather point&click required solution rather than spending a couple of days figuring out how to set up certain tools to build a server app and then a mobile app. Ideally I'd like to be able to say "yes" to this tweet:


That's said, Eclipse was included into the Red Hat Developer Toolset. The Developer Toolset is a set of tools that work together, and are decoupled from the underlying base, so you will be able to use a stable work environment and up-to-date development tools, without configuring things by yourself!

Wednesday, May 29, 2013

The most significant feature of Kepler Eclipse on Fedora

Yeah, I know I'm kind of repeating myself, but look what happens after you update Eclipse in Fedora 19:

Eclipse after update in F19

P2 discovers that you're system installation had been changed, finds what you have installed as a regular user, and then asks you to install those things again, providing you a nice wizard:

Features reinstallation wizard page
This is a big step forward since previous Fedora releases, where Eclipse package update caused a loss of user installed features, or even totally broke the installation.

Of course, not only Linux will benefit from this approach, but all setups, where users have only read-only access to a master installation administered centrally.

Edit: Things never go as smoothly as one would wish. The problem that I was having with this dialog was that when I had multiple Eclipse installed, from time to time, the dialog was trying to reinstall things from "wrong" Eclipse installation.

It turned out to be a feature, not a bug. Eclipse, when shared install is run for the very first time, tries to find previous installation on the best-can-do basis. This scenario is a bug for Fedora, because Fedora Eclipse has only one location that does not change, and therefore if there is no local configuration for that location, it means that nothing should be reinstalled. I think a solution is as easy as setting this property to the Fedora installation:

-Declipse.p2.skipMovedInstallDetection=true


Thursday, May 9, 2013

Eclipse Mylyn - quite interesting feature

Did you know that Eclipse Mylyn integrates with a History view?

Exemplary history displayed in the History view.
Unfortunately, it works this way for Red Hat bugzilla, but not for the Eclipse one :-(.

Tuesday, May 7, 2013

Eclipse Marketplace Client just got updated in Fedora 19+

Short introduction for my Fedora audience:

Eclipse Marketplace is, well, a market for Eclipse plugins.  Eclipse Marketplace Client is a tool that allows for browsing and installing plugins from within your IDE. The analogy to other application stores is quite obvious. You can install the client by invoking:

sudo yum install eclipse-mpc

Main content:

Fedora 19 release date is approaching us fast. Since the Fedora release and Eclipse release are very close to each other, and there is a freeze between the RC (Beta) and the final release, I'm updating now the Eclipse stack to the Milestone 7 - the last milestone between the final release of Eclipse.

Going from one project to another I stumbled upon Eclipse Marketplace Client. It has no new release scheduled on it's website, but the log has revealed quite interesting features, so I've decided to include those updates.

Here is a screenshot of a new Marketplace Client:


Note new attributes that are now displayed - the number of installs and favourites stars. This will definitely help to assess which solutions are well tested in the field :-).

It also looks like there will be a newsletter in the marketplace client :-)


The market place is interesting also from another point of view.  I have written a small utility mojo that transforms a p2 repository/update site into a runnable form that could be put in dropins. So the part of rpm responsible for installing the client looks like:

mvn-rpmbuild org.fedora:feclipse-maven-plugin:install  \
 -DsourceRepo=org.eclipse.epp.mpc.site/target/site -DtargetLocation=%{buildroot}%{install_loc}/eclipse

Which is a great progress from manually unzipping features into destination :-).

Yes, yes, I'm aware that dropins mechanism is not really the best solution, but that's the only solution that we managed to get work together with rpm.

Monday, April 29, 2013

Is running Eclipse on Raspberry Pi possible?

During the weekend I stumbled upon Bug 406749 Create native launcher and product export option for Raspberry Pi, which prodded me to do the long postponed task of contributing patches that has been used in Fedora to built Eclipse for arm.

My patches provide generic arm bundles. It is a part of the work. According to Fedora documentation, Arm processors exist in two versions -  software and hardware floating points. I guess that Eclipse built on one of them might not work on the other one, and it will be necessary to split each arm fragment in two.

It's also worth to consider if Eclipse on arm without FPU is really something we want - it will be unbelievably slow.

But straight to the point - I tested various amounts of memory assigned to maven for the purpose of Eclipse build - and it started succeeding only if maven was granted 900MB. That eliminates Raspberry Pi forever. Sorry for sad news :-(.

However, if you are interested in building Eclipse on various mobile devices, and you'd like to try out those patches, I'd be happy to hear the results!

And a small poll for the end (results can be found here, but please do the poll first!):


 

Wednesday, April 24, 2013

On the evilness of split packages in the OSGi

OSGi allows for having packages split across multiple bundles. This, together with a dropins mechanism, is a true mine field.


So, what's wrong with those split packages? They are split! OSGi, in some magic way, merges them during runtime, but does not see explicit dependency between bundles providing those packages.

The P2 reconciler app, using some Equinox service, refreshes all packages that have dependency changed. So, for example, if you install a bundle providing javax.xml into dropins, you'll have almost all plugins refreshed (depending on the dependency tree).

But, since bundles with split packages are not dependent on each other, you may end up in a not so much theoretical situation, were a bundle with one split package is refreshed, and the other is not. If they do depend on each other (f.e. one has an implementation, the other an interface) you will get a nice ClassCastExceptions or other, similar runtime errors.

Real Eclipse bug can be found in the Eclipse bugzilla.