Friday, February 5, 2010

P2 error messages are useless - for users and for me as a programmer

I handed out the update site URL of my "copyto" Plug-in to a friend and when he wanted to install it, p2 threw this message at him:
Cannot complete the install because one or more required items could not be found. Software being installed: support ( Missing requirement: eclipseutils.ui.copyto requires 'package org.eclipse.core.runtime.preferences 3.3.0' but it could not be found Cannot satisfy dependency: From: support ( To: eclipseutils.ui.copyto 0.0.0
I would guess that there is at least one package with the name "org.eclipse.core.runtime.preferences" installed and it would be very helpful if p2 prints out the available versions of that package. That would have made it easier for me to recognize, that 3.3.0 is obviously an Eclipse 3.6 package (I am using the I-Build as my target). Beside that, this error message displayed to a non-programmer is equally useless. It's filled with cryptic numbers and too much information the average user cannot understand. Heck, I do not even understand it and then it's also missing crucial information for me as a programmer. I filed a bug to get at least the required information into the error message.


  1. We have been looking for ways to enhance this, maybe present a tree representing the nesting of things. However on one hand you explain that the message is useless and confusing as it is but you still want to provide more information. Code on how to improve the overall presentations are welcome.

  2. Well, the message to the user would be something like this:
    "The CI could not be installed due to a missing dependency on your system."

    And then, in the "Details" button, the user would see the cryptic message, that contains information for me as a programmer to solve the dependency issue. Take a look at the MS Windows DrWatson dialogs, that appear when an application is crashed. P2 could also use the bundles "Bundle-Contact" header to file an error report to it.
    Also I would guess, if there would be a respository available that contains a bundle that exports this package, p2 would just install that bundle (and its dependencies)?