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

Bug 343968

Summary: reformat p2 dep resolution errors to make them easier to parse & resolvegit
Product: z_Archived Reporter: Nick Boldt <nboldt>
Component: TychoAssignee: Tobias Oberlies <t-oberlies>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P2 CC: caniszczyk, pwebster, t-oberlies
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
URL: http://pastebin.com/iwg0JdCG
Whiteboard:

Description Nick Boldt CLA 2011-04-27 10:32:13 EDT
Short of doing output in a much simpler cascase style, eg:

org.jboss.tools.site.aggregate 0.0.1
 > org.jboss.tools.maven.feature.feature.group 1.1.0
   > org.jboss.tools.maven.core 1.1.0
     > org.maven.ide.eclipse.jdt 0.10.0 (not found)

Could you at least add line breaks into the output?

Before (illegible blob):

[INFO] [Software being installed: org.jboss.tools.site.aggregate raw:0.0.1.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.0.1-SNAPSHOT, Missing requirement: org.jboss.tools.maven.core 1.1.0.v20110331-1458-H165-M1 requires 'bundle org.maven.ide.eclipse.jdt 0.10.0' but it could not be found, Cannot satisfy dependency: org.jboss.tools.maven.feature.feature.group 1.1.0.v20110331-1458-H165-M1 depends on: org.jboss.tools.maven.core [1.1.0.v20110331-1458-H165-M1], Cannot satisfy dependency: org.jboss.tools.site.aggregate raw:0.0.1.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.0.1-SNAPSHOT depends on: org.jboss.tools.maven.feature.feature.group 0.0.0]

After (each IU reference starts on a new line):

[INFO] [Software being installed: 
org.jboss.tools.site.aggregate raw:0.0.1.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.0.1-SNAPSHOT, Missing requirement: 
org.jboss.tools.maven.core 1.1.0.v20110331-1458-H165-M1 requires 'bundle 
org.maven.ide.eclipse.jdt 0.10.0' but it could not be found, Cannot satisfy dependency: 
org.jboss.tools.maven.feature.feature.group 1.1.0.v20110331-1458-H165-M1 depends on: 
org.jboss.tools.maven.core [1.1.0.v20110331-1458-H165-M1], Cannot satisfy dependency: 
org.jboss.tools.site.aggregate raw:0.0.1.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.0.1-SNAPSHOT depends on: 
org.jboss.tools.maven.feature.feature.group 0.0.0]

--
Note that I'm still using Tycho 0.10, so if this is already fixed, THANKS!
Comment 1 Tobias Oberlies CLA 2011-05-03 14:22:15 EDT
I agree that this would be a very good enhancement, although I would rather break before the captions ("Software being installed", "Missing requirement", "Cannot satisfy dependency").

With a -e command line switch it should be very easy to find the code location where this formatting can be done. You would need to switch to 0.13.0-SNAPSHOT though. (Note that with 0.12.0 all IDs changed. There should be a migration guide for this, but AFAIK there isn't; see bug 344629).
Comment 2 Tobias Oberlies CLA 2011-09-08 10:20:17 EDT
Fixed with 0260a99. Wasn't that hard: p2 already returns the message as (sorted) set, so Tycho just needs to print each of the @Explanation@ instances in one line :-)