Bug 15400 - Compiler generates way too many errors
Summary: Compiler generates way too many errors
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-07 07:52 EDT by Philipe Mulet CLA
Modified: 2002-05-13 12:31 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2002-05-07 07:52:35 EDT
Build 20020502

When compiling StyledText outside its context, the compiler ends up generating 
around 1,400 errors. This is way to many.

For the same scenario, javac aborts after 100 errors.

In our case, we need to be more clever since we want to still issue problem 
methods. However markers should be better issued (avoid redundant problems in 
same reference context etc...)
Comment 1 Philipe Mulet CLA 2002-05-07 09:16:27 EDT
If avoiding reporting similar errors on the same reference context 
(method/type/unit), the error count drops down to 754 for this scenario, almost 
cut by half.
Comment 2 Philipe Mulet CLA 2002-05-07 09:45:42 EDT
Can bring the number down to 738 if issuing same errors for invalid types, 
invalid argument types, field types and exception types.
Comment 3 Philipe Mulet CLA 2002-05-07 17:02:06 EDT
Here is a simpler heuristic to reduce the problem count down to a reasonable 
number (<= 50 per unit).

If there are too many problems, we sort them, and keep the first 50 of them.

Sorting is done using priorities, computed as follows:

- base priority is 1000 - problem line number (if belows 0, then it is 0).
- if problem is error: 			 priority += 10000
- if problem is outside method: 	 priority += 3000
- if problem is inside static method: 	 priority +=1000
- if problem is first inside its context priority += 1000
Comment 4 Philipe Mulet CLA 2002-05-13 12:31:17 EDT
Released heuristic into HEAD.
Fixed