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

Bug 370121

Summary: Provide more descriptive error messages in case of "resolution error"
Product: z_Archived Reporter: Davy Meers <davymeers>
Component: TychoAssignee: Project Inbox <tycho-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: igor, mistria, t-oberlies
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
output that provides the error message none

Description Davy Meers CLA 2012-01-30 08:44:19 EST
Build Identifier: 

It happens that in case of problems with p2 the error message is a rather general "resolution error". (Unfortunately i don't know exactly when this error message occurs.)

See also bug 365752 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=365752#c1):
'We really need to fix the debug output - everything is a "resolution error"...'

Reproducible: Always
Comment 1 Igor Fedorenko CLA 2012-01-30 09:00:10 EST
Please provide example message or, better yet, an example project that results in such a message.
Comment 2 Davy Meers CLA 2012-01-30 09:43:43 EST
Created attachment 210264 [details]
output that provides the error message
Comment 3 Davy Meers CLA 2012-01-30 09:49:40 EST
I created this as a result of Bug 365752.

I ran the example i provided there again (do you want me to attach that project to this bug too?).
The output of that build which shows the error message is added as an attachment.

The problem is:

The error message says the package cannot be resolved ("Missing Constraint: Import-Package: org.hamcrest; version="1.1.0"").
As a result you start to check the target platform but that seems fine so you're left wondering why it cannot be resolved.

As an afterthought: i am not sure how Tycho could provide an error message that is more descriptive. In this case it turned out to be a p2 bug.
Comment 4 Tobias Oberlies CLA 2012-05-23 09:47:04 EDT
Took me a while to understand this problem again: The p2 resolver provides a plan but without taking mandatory attributes into account (p2 bug 360659). Next, the Equinox resolver fails because it does take the attributes into account. 

In a log of recent Tycho releases, Tycho prints out what it is doing ("Computing target platform", "Resolving dependencies", "Resolving class path") so that users can at least say that there was a "resolution error" during class path computation (=Equinox resolver).

Still, we should improve the error message in this case, point to the http://wiki.eclipse.org/Tycho_Messages_Explained page and provide more details&workarounds there.
Comment 5 Mickael Istria CLA 2020-06-29 08:58:57 EDT
As mentioned by Tobias, logs have improved some time ago. Let's mark as resolved then, and please open new bugs with concrete examples if you think some message are still too hard to understand.