Bug 271684 - Incremental build should only analyze structural and description changes
Summary: Incremental build should only analyze structural and description changes
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 233643
  Show dependency tree
 
Reported: 2009-04-08 15:09 EDT by Darin Wright CLA
Modified: 2009-04-28 15:17 EDT (History)
2 users (show)

See Also:
Olivier_Thomann: review+


Attachments
work in progress (45.58 KB, patch)
2009-04-16 15:44 EDT, Michael Rennie CLA
no flags Details | Diff
update (49.21 KB, patch)
2009-04-21 12:41 EDT, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2009-04-08 15:09:44 EDT
The API analysis incremental build should only analyze types that have structural changes or have API description changes (and all their dependents). Currently, we analyze all types that change (structually or non-structurally), and all their dependents).

As well, only API visible types should be considered for analysis. A change to a non-API type does not effect API compatibility or API use.
Comment 1 Michael Rennie CLA 2009-04-15 09:47:58 EDT
> As well, only API visible types should be considered for analysis. A change to
> a non-API type does not effect API compatibility or API use.
> 

This is not entirely accurate. We need to scan internal types for the following cases:

1. unsupported tags 
2. usage (i.e. illegally extending a restricted type)
3. unused filters
4. system library usage

The only scans that are API visibility only are binary compatibility, leak and version. 

Comment 2 Michael Rennie CLA 2009-04-16 15:44:36 EDT
Created attachment 132129 [details]
work in progress

Patch removes our usage of various sets throughout the builder and adds an IBuildContext which manages changed types (structural, description and removed types). Cleans up a problem where we were considering too many types as 'changed' (causing additional scanning).

All of the tests do not pass with the patch. There is still work to be done finding a better way to work with inner types than hammering the Java model during an incremental build.
Comment 3 Michael Rennie CLA 2009-04-21 12:41:06 EDT
Created attachment 132626 [details]
update

This patch fixes the remaining problems, and all tests pass.

Currently we do the usage (illegal extends, etc) and the leak scans at the same time on the same types (which includes dependent types). The problem with this is that the leak usage scans do not need to scan dependent types or non-api types. 

We should consider breaking the leak usage scans out from the reference analyzer, or updating the scope we pass in to more precisely specify what types are scanned by which parts of the analyzer
Comment 4 Michael Rennie CLA 2009-04-22 12:07:37 EDT
Applied the latest patch which prunes the types accordingly using the new build context. It does not include asking about API description changes as that would be better placed in the reference analyzer itself - that way we don't do extra work collecting types in the context when a usage scan might not take place at all (the preferences could be set to ignore).

Opened bug 273295 to refactor the reference analyzer.

please verify Olivier
Comment 5 Olivier Thomann CLA 2009-04-28 15:17:59 EDT
Verified.