Bug 275341 - Full build run after removing unused API problem filter
Summary: Full build run after removing unused API problem filter
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 RC1   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2009-05-07 13:27 EDT by Michael Rennie CLA
Modified: 2009-05-11 17:56 EDT (History)
2 users (show)

See Also:
Olivier_Thomann: review+


Attachments
proposed fix (4.14 KB, patch)
2009-05-11 11:07 EDT, Michael Rennie CLA
no flags Details | Diff
updated fix (6.54 KB, patch)
2009-05-11 14:27 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 Michael Rennie CLA 2009-05-07 13:27:12 EDT
While verifying the combined fix for bug 274515 I found that a full was occurring when I would add / remove API problem filters for jdt.core.

Steps:

1. remove the final keyword from CompilationParticipant#READY_FOR_BUILD
2. save 

Expected 
CompilationParticipant is rebuilt

Happens
all of jdt.core is rescanned by the API tools builder - notice in the progress view that all packages are re-scanned for unsupported tags and usage
Comment 1 Michael Rennie CLA 2009-05-11 10:19:20 EDT
Sadly, this is working as designed, our builder has logic that looks for changes to the manifest and / or filters file and switches to a full build if changes have been made to either. This code was added to handle CVS changes to the filters file to ensure everything got built properly - I just forgot about it.

Investigating if we need to do this or not, or if there is a simple-ish fix we could use to preserve incremental build speed in the editing phase.
Comment 2 Michael Rennie CLA 2009-05-11 11:07:52 EDT
Created attachment 135152 [details]
proposed fix

This patch does a little extra examination of the deltas were are getting when we find one for the .api_filters file. Specifically, it only defaults to a full build if the delta is an ADD / REMOVE delta or if the CHANGED delta has an accompanying delta to the hidden CVS resource as well.

With this patch I don't even see the build appear in the progress view any more for the source editing case and using the property page to remove filters (but the associated resources are built properly).
Comment 3 Michael Rennie CLA 2009-05-11 11:08:50 EDT
Olivier please give the patch a try, and make sure I have not forgotten an edge case.
Comment 4 Michael Rennie CLA 2009-05-11 12:13:59 EDT
Olivier raised a valid point that this patch will not work with alternate SCM's, investigating what can be done for this.
Comment 5 Michael Rennie CLA 2009-05-11 14:27:26 EDT
Created attachment 135194 [details]
updated fix

This updated patch considers the alternate flags for the delta instead of accompanying deltas and also fixes up a boo boo in our build job code to make sure the right thing happens when auto-building is on in the workspace.
Comment 6 Michael Rennie CLA 2009-05-11 14:28:39 EDT
applied patch to HEAD

please verify Olivier
Comment 7 Olivier Thomann CLA 2009-05-11 17:56:34 EDT
Verified. +1.