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

Bug 316400

Summary: Translate indecipherable error when verifying the model validation into markers
Product: [Technology] CBI Reporter: David Williams <david_williams>
Component: CBI p2 Repository AggregatorAssignee: CBI Inbox <cbi-inbox>
Status: CLOSED WONTFIX QA Contact: David Williams <david_williams>
Severity: normal    
Priority: P3 CC: filip.hrbek, frederic.gurr, thomas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description David Williams CLA 2010-06-09 20:16:00 EDT
I recently tried to use aggregator to "explore" some repositories. I have version 0.1.0.r01053 installed (I think that's latest in repo). 

I defined some very simple b3aggr files, add a contribution, specify a label, and add a p2 repository, such as
http://download.eclipse.org/modeling/emft/ecoretools/updates/0.10milestones/

 
I've tried with several, but when I execute "verify" I get indecipherable error message: 



Build model validation failed: Diagnosis of org.eclipse.b3.aggregator.impl.AggregatorImpl@172a4d0{file:/D:/builds/workspaces/aggwork/org.eclipse.helios.tests/emftools.b3aggr#/}
Comment 1 Filip Hrbek CLA 2010-06-10 03:45:55 EDT
The problem is that the model is not valid (maybe you have not set the aggregation label). All relevant information is logged in the error log. You can also try validation of the model prior to running the verification manually (context menu, option "Validate") to see if the model is OK.

I suggest that we add a hint to check the error log for details to the error message:

"
Build model validation failed: Diagnosis of
org.eclipse.b3.aggregator.impl.AggregatorImpl@172a4d0{file:/D:/builds/workspaces/aggwork/org.eclipse.helios.tests/emftools.b3aggr#/}.
Check error log for more details.
"
Comment 2 David Williams CLA 2010-06-10 07:51:02 EDT
I don't think the hint about checking the log would help. I was checking the log and I couldn't see what was relevant and what was not. 

Running 'validate' did help, though. When I did that, a message popped up saying I needed some other label than the one I provided and I needed to define at least one configuration. 

Perhaps 'validate' could automatically be ran first under the covers, before 'verify'?  Is there any point to running verify if validate has errors? 

I hope you find this report helpful.
Comment 3 Filip Hrbek CLA 2010-06-10 07:58:11 EDT
Running 'validate' prior to starting verify/build process is exactly what happens today. The only difference between manual and automatic run is that when running automatically, it runs in the background (with no GUI). It discovers the same problems as manual validation. If there are model validation errors, the process does not continue.

The question is how to report the results. There may be many warnings at once so our current approach is to announce a simple error message and all the details are sent to the error log (it must really be there, I can see it in my IDE). I am not sure if merging all messages into a single error message would be helpful (perhaps it would?).
Comment 4 David Williams CLA 2010-06-10 08:53:38 EDT
> 
> The question is how to report the results. There may be many warnings at once
> so our current approach is to announce a simple error message and all the
> details are sent to the error log (it must really be there, I can see it in my
> IDE). I am not sure if merging all messages into a single error message would
> be helpful (perhaps it would?).

I'd think so. I think the practice of telling users to "see the log for details" should be banned from Eclipse IDE. :) It is never user friendly. 

The very best thing to do would be to put them in the "problems view" (or, is markers view the currently recommended one ... I forget). 

But short of that, if you are popping up a message, it should contain what lead to the error ... not just say that an error occurred.
Comment 5 Thomas Hallgren CLA 2011-07-09 04:14:03 EDT
The message now contains all information about what is failing. I'm leaving the bug open though, because it still isn't very readable. The error should be translated into markers on the invalid elements.
Comment 6 David Williams CLA 2016-09-16 15:43:05 EDT
[Bookkeeping change only. Moving bugs to the new "home" of aggregator, CBI.]
Comment 7 Frederic Gurr CLA 2023-09-01 10:03:55 EDT
If this issue is still relevant, please move it to https://github.com/eclipse-cbi/p2repo-aggregator/issues.